Skip to content

Commit 022e17d

Browse files
author
Guillaume Chau
committed
fix: --dev shouldn't try to load dev assets, closes #3802
1 parent d97ed6c commit 022e17d

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/@vue/cli-ui/apollo-server/connectors/folders.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function isDirectory (file) {
1818
try {
1919
return fs.statSync(file).isDirectory()
2020
} catch (e) {
21-
if (process.env.VUE_APP_CLI_UI_DEV) console.warn(e.message)
21+
if (process.env.VUE_APP_CLI_UI_DEBUG) console.warn(e.message)
2222
}
2323
return false
2424
}
@@ -60,7 +60,7 @@ function isHidden (file) {
6060

6161
return (!isPlatformWindows && result.unix) || (isPlatformWindows && result.windows)
6262
} catch (e) {
63-
if (process.env.VUE_APP_CLI_UI_DEV) {
63+
if (process.env.VUE_APP_CLI_UI_DEBUG) {
6464
console.log('file:', file)
6565
console.error(e)
6666
}
@@ -134,7 +134,7 @@ function isVueProject (file, context) {
134134
const pkg = readPackage(file, context)
135135
return Object.keys(pkg.devDependencies || {}).includes('@vue/cli-service')
136136
} catch (e) {
137-
if (process.env.VUE_APP_CLI_UI_DEV) {
137+
if (process.env.VUE_APP_CLI_UI_DEBUG) {
138138
console.log(e)
139139
}
140140
}

packages/@vue/cli-ui/apollo-server/util/logger.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const chalk = require('chalk')
22

33
exports.log = (...args) => {
4-
if (!process.env.VUE_APP_CLI_UI_DEV) return
4+
if (!process.env.VUE_APP_CLI_UI_DEBUG) return
55
const date = new Date()
66
const timestamp = `${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}.${date.getSeconds().toString().padStart(2, '0')}`
77
const first = args.shift()
@@ -15,7 +15,7 @@ const simpleTypes = [
1515
]
1616

1717
exports.dumpObject = (obj) => {
18-
if (!process.env.VUE_APP_CLI_UI_DEV) return
18+
if (!process.env.VUE_APP_CLI_UI_DEBUG) return
1919
const result = {}
2020
Object.keys(obj).forEach(key => {
2121
const value = obj[key]

packages/@vue/cli-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"serve": "cross-env VUE_APP_CLI_UI_URL=ws://localhost:4030/graphql VUE_APP_GRAPHQL_PORT=4030 vue-cli-service serve",
1111
"build": "vue-cli-service build",
1212
"lint": "vue-cli-service lint src apollo-server",
13-
"apollo": "cross-env VUE_APP_CLI_UI_DEV=true VUE_APP_GRAPHQL_PORT=4030 vue-cli-service apollo:watch",
13+
"apollo": "cross-env VUE_APP_CLI_UI_DEV=true VUE_APP_CLI_UI_DEBUG=true VUE_APP_GRAPHQL_PORT=4030 vue-cli-service apollo:watch",
1414
"apollo:debug": "cross-env VUE_CLI_DEBUG=true yarn run apollo",
1515
"apollo:run": "cross-env VUE_CLI_PLUGIN_DEV=true VUE_CLI_IPC=vue-cli-dev vue-cli-service apollo:run",
1616
"apollo:run:test": "cross-env VUE_CLI_DEBUG=true VUE_CLI_UI_TEST=true VUE_APP_GRAPHQL_PORT=4040 VUE_APP_CLI_UI_URL=ws://localhost:4040/graphql VUE_CLI_IPC=vue-cli-test vue-cli-service apollo:watch --mode production",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function ui (options = {}, context = process.cwd()) {
1919

2020
// Dev mode
2121
if (options.dev) {
22-
process.env.VUE_APP_CLI_UI_DEV = true
22+
process.env.VUE_APP_CLI_UI_DEBUG = true
2323
}
2424

2525
if (!process.env.VUE_CLI_IPC) {

0 commit comments

Comments
 (0)