From 6b9c7c6ca8a88dda26469338988b217575c4fdcb Mon Sep 17 00:00:00 2001 From: Nicolas Martinez <17040442+nicomt@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:12:25 -0400 Subject: [PATCH] Fix for loading data from both viteEnv and process.env --- vite.config.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vite.config.mjs b/vite.config.mjs index 573cc8fa..81ec0d8e 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -9,9 +9,9 @@ export default defineConfig(({ mode }) => { const env = {} // Filter env to variables starting with VITE_APP or VUE_APP - Object.keys({...process.env, ...viteEnv}).forEach(key => { + Object.entries({...process.env, ...viteEnv}).forEach(([key, value]) => { if (key.startsWith('VITE_APP') || key.startsWith('VUE_APP')) { - env[key] = viteEnv[key] + env[key] = value } })