Skip to content

Commit 6b9c7c6

Browse files
committed
Fix for loading data from both viteEnv and process.env
1 parent 2371c1c commit 6b9c7c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vite.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export default defineConfig(({ mode }) => {
99
const env = {}
1010

1111
// Filter env to variables starting with VITE_APP or VUE_APP
12-
Object.keys({...process.env, ...viteEnv}).forEach(key => {
12+
Object.entries({...process.env, ...viteEnv}).forEach(([key, value]) => {
1313
if (key.startsWith('VITE_APP') || key.startsWith('VUE_APP')) {
14-
env[key] = viteEnv[key]
14+
env[key] = value
1515
}
1616
})
1717

0 commit comments

Comments
 (0)