mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-21 20:08:41 -05:00
fix: Fixed a bug that caused mode to be ignored if run together with watch (#1700)
* fix: Fixed a bug that caused —mode to be ignored if run together with —watch * fix: Moved the paren that caused the expression to evaluate wrongly
This commit is contained in:
committed by
Guillaume Chau
parent
e2a7063c9f
commit
1b1a89fd43
@@ -157,8 +157,8 @@ module.exports = class Service {
|
||||
async run (name, args = {}, rawArgv = []) {
|
||||
// resolve mode
|
||||
// prioritize inline --mode
|
||||
// fallback to resolved default modes from plugins
|
||||
const mode = name === 'build' && args.watch ? 'development' : args.mode || this.modes[name]
|
||||
// fallback to resolved default modes from plugins or development if --watch is defined
|
||||
const mode = args.mode || (name === 'build' && args.watch ? 'development' : this.modes[name])
|
||||
|
||||
// load env variables, load user config, apply plugins
|
||||
this.init(mode)
|
||||
|
||||
Reference in New Issue
Block a user