Skip to content

Commit 5b6506a

Browse files
committed
fix($core): merge #2028
1 parent 2e79ab5 commit 5b6506a

File tree

1 file changed

+1
-2
lines changed
  • packages/@vuepress/core/lib/node

1 file changed

+1
-2
lines changed

Diff for: packages/@vuepress/core/lib/node/App.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module.exports = class App {
3838
*/
3939

4040
constructor (options = {}) {
41+
this.isProd = process.env.NODE_ENV === 'production'
4142
this.options = options
4243
this.sourceDir = this.options.sourceDir || path.join(__dirname, 'docs.fallback')
4344
logger.debug('sourceDir', this.sourceDir)
@@ -459,7 +460,6 @@ module.exports = class App {
459460
*/
460461

461462
async dev () {
462-
this.isProd = false
463463
this.devProcess = new DevProcess(this)
464464
await this.devProcess.process()
465465
const error = await new Promise(resolve => {
@@ -489,7 +489,6 @@ module.exports = class App {
489489
*/
490490

491491
async build () {
492-
this.isProd = true
493492
this.buildProcess = new BuildProcess(this)
494493
await this.buildProcess.process()
495494
await this.buildProcess.render()

0 commit comments

Comments
 (0)