mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
Don't set babelOptions.presets
if babelrc = true
This commit is contained in:
parent
cafc94d9f9
commit
e59b3dd4f7
@ -120,12 +120,14 @@ export default class Builder extends Tapable {
|
|||||||
|
|
||||||
// Babel options
|
// Babel options
|
||||||
this.babelOptions = _.defaults(this.options.build.babel, {
|
this.babelOptions = _.defaults(this.options.build.babel, {
|
||||||
presets: [
|
|
||||||
require.resolve('babel-preset-vue-app')
|
|
||||||
],
|
|
||||||
babelrc: false,
|
babelrc: false,
|
||||||
cacheDirectory: !!this.options.dev
|
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
|
// Map postcss plugins into instances on object mode once
|
||||||
if (isPureObject(this.options.build.postcss)) {
|
if (isPureObject(this.options.build.postcss)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user