From a3977a3e51417ddda8f0e7fde97b4e29d2d224f7 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 12 Jan 2020 21:53:12 +0100 Subject: [PATCH] fix webpack polyfills (#9735) webpack polyfills did not work because useBuiltIns: 'entry' expects a explicit core-js import. Changed it to 'usage' which does not require these explicit imports and polyfills based on browserslist. As a result, the built index.js now went from 128kB to 192kB. Ref: https://babeljs.io/docs/en/babel-preset-env#usebuiltins Co-authored-by: zeripath --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 7efde9503..b53934c62 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -36,7 +36,7 @@ module.exports = { [ '@babel/preset-env', { - useBuiltIns: 'entry', + useBuiltIns: 'usage', corejs: 3, } ]