Skip to content

Commit c932991

Browse files
committed
fix($core): Set production mode before creating VuePress app on build mode
1 parent 890e85d commit c932991

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

packages/@vuepress/core/lib/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ async function dev (options) {
1616
}
1717

1818
async function build (options) {
19+
process.env.NODE_ENV = 'production'
1920
const app = createApp(options)
2021
await app.process()
2122
return app.build()

packages/@vuepress/core/lib/node/build/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const { normalizeHeadTag, applyUserWebpackConfig } = require('../util/index')
1818
module.exports = class Build extends EventEmitter {
1919
constructor (context) {
2020
super()
21-
process.env.NODE_ENV = 'production'
2221
this.context = context
2322
this.outDir = this.context.outDir
2423
}

0 commit comments

Comments
 (0)