Merge pull request #1480 from whtsky/defaults-babel-presets

Don't set `babelOptions.presets` if babelrc = true
This commit is contained in:
Sébastien Chopin 2017-08-25 12:15:52 +02:00 committed by GitHub
commit 3bf1cb90c4

View File

@ -120,12 +120,14 @@ export default class Builder extends Tapable {
// Babel options
this.babelOptions = _.defaults(this.options.build.babel, {
presets: [
require.resolve('babel-preset-vue-app')
],
babelrc: false,
cacheDirectory: !!this.options.dev
})
if (!this.babelOptions.babelrc && !this.babelOptions.presets) {
this.babelOptions.presets = [
require.resolve('babel-preset-vue-app')
]
}
// Map postcss plugins into instances on object mode once
if (isPureObject(this.options.build.postcss)) {