mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +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
|
// 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