mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-01 14:53:28 +00:00
webpack: process.env.NODE_ENV are set to production or development
This commit is contained in:
parent
32aeeab0ae
commit
742ea42f97
@ -79,9 +79,6 @@ module.exports = function webpackClientConfig() {
|
|||||||
config.plugins.push(
|
config.plugins.push(
|
||||||
new webpack.DefinePlugin(
|
new webpack.DefinePlugin(
|
||||||
Object.assign(env, {
|
Object.assign(env, {
|
||||||
'process.env.NODE_ENV': JSON.stringify(
|
|
||||||
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),
|
||||||
'process.browser': true,
|
'process.browser': true,
|
||||||
|
@ -46,9 +46,6 @@ module.exports = function webpackServerConfig() {
|
|||||||
}),
|
}),
|
||||||
new webpack.DefinePlugin(
|
new webpack.DefinePlugin(
|
||||||
Object.assign(env, {
|
Object.assign(env, {
|
||||||
'process.env.NODE_ENV': JSON.stringify(
|
|
||||||
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),
|
||||||
'process.browser': false,
|
'process.browser': false,
|
||||||
|
Loading…
Reference in New Issue
Block a user