diff --git a/packages/@vuepress/core/lib/index.js b/packages/@vuepress/core/lib/index.js index 85afa96123..31d0ad8576 100644 --- a/packages/@vuepress/core/lib/index.js +++ b/packages/@vuepress/core/lib/index.js @@ -11,12 +11,14 @@ function createApp (options) { async function dev (options) { const app = createApp(options) + app.isProd = false await app.process() return app.dev() } async function build (options) { const app = createApp(options) + app.isProd = true await app.process() return app.build() } diff --git a/packages/@vuepress/core/lib/node/App.js b/packages/@vuepress/core/lib/node/App.js index e21c8ce29b..797e81338f 100755 --- a/packages/@vuepress/core/lib/node/App.js +++ b/packages/@vuepress/core/lib/node/App.js @@ -459,7 +459,6 @@ module.exports = class App { */ async dev () { - this.isProd = false this.devProcess = new DevProcess(this) await this.devProcess.process() const error = await new Promise(resolve => { @@ -489,7 +488,6 @@ module.exports = class App { */ async build () { - this.isProd = true this.buildProcess = new BuildProcess(this) await this.buildProcess.process() await this.buildProcess.render()