mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-13 12:40:18 -05:00
22 lines
429 B
JavaScript
22 lines
429 B
JavaScript
module.exports = cli => {
|
|
cli.injectFeature({
|
|
name: 'Babel',
|
|
value: 'babel',
|
|
short: 'Babel',
|
|
checked: true
|
|
})
|
|
|
|
cli.onPromptComplete((answers, options) => {
|
|
if (answers.features.includes('ts')) {
|
|
if (!answers.useTsWithBabel) {
|
|
return
|
|
}
|
|
} else {
|
|
if (!answers.features.includes('babel')) {
|
|
return
|
|
}
|
|
}
|
|
options.plugins['@vue/cli-plugin-babel'] = {}
|
|
})
|
|
}
|