process: Add process.mode

This commit is contained in:
Sebastien Chopin 2017-08-23 18:21:27 +02:00
parent 4ac14054f2
commit 04d05de906
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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