mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix #2741: add staging environment via NODE_ENV
This commit is contained in:
parent
1582df149d
commit
13b74b8f36
@ -92,7 +92,7 @@ module.exports = function webpackClientConfig() {
|
||||
new webpack.DefinePlugin(
|
||||
Object.assign(env, {
|
||||
'process.env.NODE_ENV': JSON.stringify(
|
||||
env.NODE_ENV || (this.options.dev ? 'development' : 'production')
|
||||
this.options.env.NODE_ENV || (this.options.dev ? 'development' : 'production')
|
||||
),
|
||||
'process.env.VUE_ENV': JSON.stringify('client'),
|
||||
'process.mode': JSON.stringify(this.options.mode),
|
||||
|
@ -47,7 +47,7 @@ module.exports = function webpackServerConfig() {
|
||||
new webpack.DefinePlugin(
|
||||
Object.assign(env, {
|
||||
'process.env.NODE_ENV': JSON.stringify(
|
||||
env.NODE_ENV || (this.options.dev ? 'development' : 'production')
|
||||
this.options.env.NODE_ENV || (this.options.dev ? 'development' : 'production')
|
||||
),
|
||||
'process.env.VUE_ENV': JSON.stringify('server'),
|
||||
'process.mode': JSON.stringify(this.options.mode),
|
||||
|
Loading…
Reference in New Issue
Block a user