Skip to content

Commit 09b72eb

Browse files
author
Guillaume Chau
committedJun 14, 2018
fix(ui): wrong NODE_ENV value if undefined
1 parent dbf7231 commit 09b72eb

File tree

1 file changed

+6
-1
lines changed
  • packages/@vue/cli/lib

1 file changed

+6
-1
lines changed
 

‎packages/@vue/cli/lib/ui.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ async function ui (options = {}, context = process.cwd()) {
1212
process.env.VUE_APP_CLI_UI_URL = ''
1313

1414
// Optimize express
15+
const nodeEnv = process.env.NODE_ENV
1516
process.env.NODE_ENV = 'production'
1617

1718
// Dev mode
@@ -48,7 +49,11 @@ async function ui (options = {}, context = process.cwd()) {
4849

4950
server(opts, () => {
5051
// Reset for yarn/npm to work correctly
51-
process.env.NODE_ENV = undefined
52+
if (typeof nodeEnv === 'undefined') {
53+
delete process.env.NODE_ENV
54+
} else {
55+
process.env.NODE_ENV = nodeEnv
56+
}
5257

5358
// Open browser
5459
const url = `http://localhost:${port}`

0 commit comments

Comments
 (0)