Rename process.generate to process.static

This commit is contained in:
Sebastien Chopin 2017-08-17 14:50:39 +02:00
parent 42d967c27b
commit c1d2d4c626
3 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ export default class Builder extends Tapable {
constructor (nuxt) { constructor (nuxt) {
super() super()
this.nuxt = nuxt this.nuxt = nuxt
this.generate = false // Flag to know if the build is for a generated app this.isStatic = false // Flag to know if the build is for a generated app
this.options = nuxt.options this.options = nuxt.options
// Fields that set on build // Fields that set on build
@ -90,7 +90,7 @@ export default class Builder extends Tapable {
} }
forGenerate() { forGenerate() {
this.generate = true this.isStatic = true
} }
async build () { async build () {

View File

@ -104,7 +104,7 @@ export default function webpackClientConfig () {
'process.env.VUE_ENV': JSON.stringify('client'), 'process.env.VUE_ENV': JSON.stringify('client'),
'process.browser': true, 'process.browser': true,
'process.server': false, 'process.server': false,
'process.generate': this.generate 'process.static': this.isStatic
})) }))
) )

View File

@ -45,7 +45,7 @@ export default function webpackServerConfig () {
'process.env.VUE_ENV': JSON.stringify('server'), 'process.env.VUE_ENV': JSON.stringify('server'),
'process.browser': false, 'process.browser': false,
'process.server': true, 'process.server': true,
'process.generate': this.generate 'process.static': this.isStatic
})) }))
]) ])
}) })