diff --git a/lib/webpack/base.config.js b/lib/webpack/base.config.js index 7e97ebe31d..d5f22033f8 100644 --- a/lib/webpack/base.config.js +++ b/lib/webpack/base.config.js @@ -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 }) } diff --git a/lib/webpack/vue-loader.config.js b/lib/webpack/vue-loader.config.js index b045d1a29c..e755a1fc96 100644 --- a/lib/webpack/vue-loader.config.js +++ b/lib/webpack/vue-loader.config.js @@ -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, diff --git a/package.json b/package.json index 8fc7d9b501..d2bd7d3db1 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/webpack.config.js b/webpack.config.js index 53c731ff72..bc77a1e10f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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 } }