@beets Okay, yeah. That works as expected, but I’m still not able to dynamically get my environment variables.
Even if I define like below inside quasar.conf.js if I console.log(process.env)
somewhere else in the project it will still be an empty object.
build: {
env: {
foo: "bar"
}
}
Edit: I put it all inside a child property. THat seems to solve it:
build: {
vueRouterMode: 'history', // available values: 'hash', 'history',
env: {
props: Object.entries(process.env).reduce((acc, [key, val]) => {
if (key.startsWith('VUE_APP')) {
acc[key] = val;
}
return acc;
}, {}),
},
}