Use vue-app preset for babel

This commit is contained in:
Sébastien Chopin 2017-02-17 16:13:51 +01:00
parent bea7b73ad5
commit 2bb8f1fd58
4 changed files with 5 additions and 30 deletions

View File

@ -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
}) })
} }

View File

@ -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,

View File

@ -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",

View File

@ -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
} }
} }