Fix for loading data from both viteEnv and process.env
This commit is contained in:
+2
-2
@@ -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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user