From 6c3fbf0b41208dedea14ad28330d2d5b142fae99 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Mon, 16 Jul 2018 23:36:28 +0200 Subject: [PATCH] Framework: Move @babel/polyfill import to webpack config --- client/boot/polyfills.js | 5 ----- webpack.config.js | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/client/boot/polyfills.js b/client/boot/polyfills.js index 518f2b80790b8..8c468361c0d0a 100644 --- a/client/boot/polyfills.js +++ b/client/boot/polyfills.js @@ -1,13 +1,8 @@ /** @format */ -/** - * External dependencies - */ -import '@babel/polyfill'; /** * Internal dependencies */ - import localStoragePolyfill from 'lib/local-storage'; localStoragePolyfill(); diff --git a/webpack.config.js b/webpack.config.js index f07e5d03b76aa..d26969bdd5787 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -74,7 +74,7 @@ const babelLoader = { const webpackConfig = { bail: ! isDevelopment, - entry: { build: [ path.join( __dirname, 'client', 'boot', 'app' ) ] }, + entry: { build: [ '@babel/polyfill', path.join( __dirname, 'client', 'boot', 'app' ) ] }, profile: shouldEmitStats, mode: isDevelopment ? 'development' : 'production', devtool: isDevelopment ? '#eval' : process.env.SOURCEMAP || false, // in production builds you can specify a source-map via env var