fix(webpack dashboard): support any command for mode

This commit is contained in:
Guillaume Chau
2018-08-30 13:28:08 +02:00
parent ff57b8f55f
commit 855da76170

View File

@@ -43,7 +43,7 @@ export default {
},
created () {
const mode = this.mode = this.TaskDetails.task.command.indexOf('vue-cli-service serve') !== -1 ? 'serve' : 'build'
const mode = this.mode = this.TaskDetails.task.command.match(/vue-cli-service\s+(\S+)/)[1]
this.$store.commit('mode', mode)
if (mode === 'build') {
this.syncMode('build-modern')