diff --git a/.babelrc b/.babelrc index c339307..0a3d56b 100644 --- a/.babelrc +++ b/.babelrc @@ -5,5 +5,8 @@ "presets": ["es2015", "stage-3", "react"] } }, - "plugins": ["react-hot-loader/babel"] + "plugins": [ + "react-hot-loader/babel", + "transform-runtime" + ] } diff --git a/package.json b/package.json index cb44776..95dbccb 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "devDependencies": { "babel-core": "6.24.1", "babel-loader": "^6.2.10", - "babel-polyfill": "6.23.0", + "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "babel-preset-stage-3": "^6.17.0", diff --git a/webpack.config.js b/webpack.config.js index 8c593fc..156e096 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -30,7 +30,7 @@ HashBundlePlugin.prototype.apply = (compiler) => { }; const config = { - entry: ['babel-polyfill', path.resolve(__dirname, 'src')], + entry: [path.resolve(__dirname, 'src')], output: { filename: `${isProd ? '[hash].' : ''}[name].js`, path: path.resolve(__dirname, 'build'), @@ -99,6 +99,9 @@ const config = { host: 'localhost', port: Number(process.env.PORT) || 8080, historyApiFallback: true, + stats: { + chunks: false + } }, }; @@ -110,7 +113,6 @@ if (!isProd) { 'react-hot-loader/patch', `webpack-dev-server/client?http://${config.devServer.host}:${config.devServer.port}`, 'webpack/hot/only-dev-server', // "only" prevents reload on syntax errors - 'babel-polyfill', path.resolve(__dirname, 'src'), ];