From 2e625771032386a6b62ca2906d773563105927f6 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Sat, 11 Jan 2025 14:28:19 +0100 Subject: [PATCH] [FIX] (front) fix the environment semection in production mode --- front/src/environment.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/front/src/environment.ts b/front/src/environment.ts index 48a87ca..64a981d 100644 --- a/front/src/environment.ts +++ b/front/src/environment.ts @@ -80,7 +80,6 @@ const environment_hybrid: Environment = { tokenStoredInPermanentStorage: false, }; -export const environment = environment_local; /** * Check if the current environment is for development @@ -90,6 +89,9 @@ export const isDevelopmentEnvironment = () => { return import.meta.env.MODE === 'development'; }; +export const environment = isDevelopmentEnvironment() ? environment_local : environment_back_prod; + + /** * get the current REST api URL. Depend on the VITE_API_BASE_URL env variable. * @returns The URL with http(s)://***