mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
Merge pull request #1480 from whtsky/defaults-babel-presets
Don't set `babelOptions.presets` if babelrc = true
This commit is contained in:
commit
3bf1cb90c4
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user