mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
Use vue-app preset for babel
This commit is contained in:
parent
bea7b73ad5
commit
2bb8f1fd58
@ -64,14 +64,7 @@ export default function ({ isClient, isServer }) {
|
||||
loader: 'babel-loader',
|
||||
exclude: /node_modules/,
|
||||
query: defaults(this.options.build.babel, {
|
||||
plugins: [
|
||||
'transform-async-to-generator',
|
||||
'transform-runtime'
|
||||
],
|
||||
presets: [
|
||||
['es2015', { modules: false }],
|
||||
'stage-2'
|
||||
],
|
||||
presets: ['vue-app'],
|
||||
cacheDirectory: !!this.dev
|
||||
})
|
||||
}
|
||||
|
@ -4,14 +4,8 @@ import { defaults } from 'lodash'
|
||||
|
||||
export default function ({ isClient }) {
|
||||
let babelOptions = JSON.stringify(defaults(this.options.build.babel, {
|
||||
plugins: [
|
||||
'transform-async-to-generator',
|
||||
'transform-runtime'
|
||||
],
|
||||
presets: [
|
||||
['es2015', { modules: false }],
|
||||
'stage-2'
|
||||
]
|
||||
presets: ['vue-app'],
|
||||
cacheDirectory: !!this.dev
|
||||
}))
|
||||
let config = {
|
||||
postcss: this.options.build.postcss,
|
||||
|
@ -51,11 +51,7 @@
|
||||
"autoprefixer": "^6.7.2",
|
||||
"babel-core": "^6.22.1",
|
||||
"babel-loader": "^6.2.10",
|
||||
"babel-plugin-array-includes": "^2.0.3",
|
||||
"babel-plugin-transform-async-to-generator": "^6.22.0",
|
||||
"babel-plugin-transform-runtime": "^6.22.0",
|
||||
"babel-preset-es2015": "^6.22.0",
|
||||
"babel-preset-stage-2": "^6.22.0",
|
||||
"babel-preset-vue-app": "^0.4.0",
|
||||
"chokidar": "^1.6.1",
|
||||
"co": "^4.6.0",
|
||||
"css-loader": "^0.26.1",
|
||||
|
@ -31,15 +31,7 @@ module.exports = {
|
||||
loader: 'babel-loader',
|
||||
exclude: /node_modules/,
|
||||
query: {
|
||||
plugins: [
|
||||
'transform-async-to-generator',
|
||||
'array-includes',
|
||||
'transform-runtime'
|
||||
],
|
||||
presets: [
|
||||
['es2015', { modules: false }],
|
||||
'stage-2'
|
||||
],
|
||||
presets: ['vue-app'],
|
||||
cacheDirectory: true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user