From 5fe01fdc0a323af3b3ad6e06686305a09480c8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 27 Dec 2016 14:55:33 +0100 Subject: [PATCH] remove babel-polyfill --- package.json | 4 +++- webpack.config.js | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 24f723309d..d9b174bd2a 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,9 @@ "autoprefixer": "^6.6.0", "babel-core": "^6.21.0", "babel-loader": "^6.2.10", - "babel-polyfill": "^6.20.0", + "babel-plugin-array-includes": "^2.0.3", + "babel-plugin-transform-async-to-generator": "^6.16.0", + "babel-plugin-transform-runtime": "^6.15.0", "babel-preset-es2015": "^6.18.0", "babel-preset-stage-2": "^6.18.0", "chokidar": "^1.6.1", diff --git a/webpack.config.js b/webpack.config.js index 8db6a610d0..ce73520104 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,16 +10,14 @@ module.exports = { __filename: false }, devtool: 'source-map', - entry: ['babel-polyfill', r('./lib/nuxt.js')], + entry: r('./lib/nuxt.js'), output: { path: r('./dist'), filename: 'nuxt.js', libraryTarget: 'commonjs2' }, externals: [ - nodeExternals({ - whitelist: ['babel-polyfill'] - }) + nodeExternals() ], module: { rules: [ @@ -32,6 +30,11 @@ module.exports = { loader: 'babel-loader', exclude: /node_modules/, query: { + plugins: [ + 'transform-async-to-generator', + 'array-includes', + 'transform-runtime' + ], presets: [ ['es2015', { modules: false }], 'stage-2'