mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-03 10:57:18 +00:00
Add babel options in .vue files
This commit is contained in:
parent
efd6b5cefa
commit
1c4e767850
@ -1,12 +1,14 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
|
const { defaults } = require('lodash')
|
||||||
|
|
||||||
module.exports = function () {
|
module.exports = function () {
|
||||||
let babelOptions = JSON.stringify({
|
let babelOptions = JSON.stringify(defaults(this.options.build.babel, {
|
||||||
presets: [
|
presets: [
|
||||||
['es2015', { modules: false }],
|
['es2015', { modules: false }],
|
||||||
'stage-2'
|
'stage-2'
|
||||||
]
|
]
|
||||||
})
|
}))
|
||||||
let config = {
|
let config = {
|
||||||
postcss: this.options.build.postcss,
|
postcss: this.options.build.postcss,
|
||||||
loaders: {
|
loaders: {
|
||||||
|
Loading…
Reference in New Issue
Block a user