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