mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
process: Add process.mode
This commit is contained in:
parent
4ac14054f2
commit
04d05de906
@ -128,6 +128,7 @@ export default function webpackClientConfig () {
|
||||
new webpack.DefinePlugin(Object.assign(env, {
|
||||
'process.env.NODE_ENV': JSON.stringify(env.NODE_ENV || (this.options.dev ? 'development' : 'production')),
|
||||
'process.env.VUE_ENV': JSON.stringify('client'),
|
||||
'process.mode': JSON.stringify(this.options.mode),
|
||||
'process.browser': true,
|
||||
'process.server': false,
|
||||
'process.static': this.isStatic
|
||||
|
@ -41,6 +41,7 @@ export default function webpackServerConfig () {
|
||||
new webpack.DefinePlugin(Object.assign(env, {
|
||||
'process.env.NODE_ENV': JSON.stringify(env.NODE_ENV || (this.options.dev ? 'development' : 'production')),
|
||||
'process.env.VUE_ENV': JSON.stringify('server'),
|
||||
'process.mode': JSON.stringify(this.options.mode),
|
||||
'process.browser': false,
|
||||
'process.server': true,
|
||||
'process.static': this.isStatic
|
||||
|
Loading…
Reference in New Issue
Block a user