Fix for loading data from both viteEnv and process.env

This commit is contained in:
Nicolas Martinez
2024-06-06 16:12:25 -04:00
parent 2371c1c092
commit 6b9c7c6ca8
+2 -2
View File
@@ -9,9 +9,9 @@ export default defineConfig(({ mode }) => {
const env = {} const env = {}
// Filter env to variables starting with VITE_APP or VUE_APP // 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')) { if (key.startsWith('VITE_APP') || key.startsWith('VUE_APP')) {
env[key] = viteEnv[key] env[key] = value
} }
}) })