Static GitHub Issues

[638] set custom Environment on nuxt build

prev: when i use nuxt in ie9 , i find it useless to set var in asyncData function
next: Vue 2.3.x broke middleware in dev

Hello. I want set custom custom Environment

set NODE_ENV=test && nuxt build

in my code

console.log('NODE_ENV', process.env.NODE_ENV) => production

Any ideas? How set Environment?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c552">#c552</a>)</em></sub></div>