diff options
author | silverwind <me@silverwind.io> | 2020-01-12 21:53:12 +0100 |
---|---|---|
committer | Antoine GIRARD <sapk@users.noreply.github.com> | 2020-01-12 21:53:12 +0100 |
commit | a3977a3e51417ddda8f0e7fde97b4e29d2d224f7 (patch) | |
tree | e1e49949254c9ce94bfb029c58c484b402daf5d3 /webpack.config.js | |
parent | 74e35aae111a388d4f36c3d2ad1ae611af718276 (diff) | |
download | gitea-a3977a3e51417ddda8f0e7fde97b4e29d2d224f7.tar.gz gitea-a3977a3e51417ddda8f0e7fde97b4e29d2d224f7.zip |
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 <art27@cantab.net>
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/webpack.config.js b/webpack.config.js index 7efde9503e..b53934c621 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -36,7 +36,7 @@ module.exports = { [ '@babel/preset-env', { - useBuiltIns: 'entry', + useBuiltIns: 'usage', corejs: 3, } ] |