mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +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(
|
new webpack.DefinePlugin(
|
||||||
Object.assign(env, {
|
Object.assign(env, {
|
||||||
'process.env.NODE_ENV': JSON.stringify(
|
'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.env.VUE_ENV': JSON.stringify('client'),
|
||||||
'process.mode': JSON.stringify(this.options.mode),
|
'process.mode': JSON.stringify(this.options.mode),
|
||||||
|
@ -47,7 +47,7 @@ module.exports = function webpackServerConfig() {
|
|||||||
new webpack.DefinePlugin(
|
new webpack.DefinePlugin(
|
||||||
Object.assign(env, {
|
Object.assign(env, {
|
||||||
'process.env.NODE_ENV': JSON.stringify(
|
'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.env.VUE_ENV': JSON.stringify('server'),
|
||||||
'process.mode': JSON.stringify(this.options.mode),
|
'process.mode': JSON.stringify(this.options.mode),
|
||||||
|
Loading…
Reference in New Issue
Block a user