Reputation: 15938
I’d like to know if it’s possible to change client side configuration AFTER nuxt build happened. Scenario would be : build once, deploy on multiple envs with some configuration varations.
I’m well aware that you can affect some parameters with environnement variables (like API_URL), but it doesn’t seem to affect client side execution.
Example:
Thanks for your help ! Cédric
Upvotes: 1
Views: 829
Reputation: 17621
You can use nuxt-env module https://github.com/samtgarson/nuxt-env
export default {
computed: {
testValue () { return this.$env.TEST_VALUE }
}
}
Upvotes: 2