0👍
You can assign its value to data
then render it in client-side
<div>{{ NODE_ENV }}</div>
data() {
return {
NODE_ENV: process.env.NODE_ENV
}
}
0👍
vue-config seems to be a good way to handle client side configs and can read config from an endpoint.
https://github.com/airyland/vue-config
from this question
https://stackoverflow.com/a/42549522/1146785
- [Vuejs]-Is there any way to add an attribute to a minified JS script tags in Nuxt?
- [Vuejs]-Vuex dynamic module register shows object empty
Source:stackexchange.com