1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00

fix webpack polyfills (#9735) (#9738)

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
This commit is contained in:
silverwind 2020-01-12 23:43:16 +01:00 committed by techknowlogick
parent b13b9d3dbd
commit 3e23dad075

View File

@ -36,7 +36,7 @@ module.exports = {
[
'@babel/preset-env',
{
useBuiltIns: 'entry',
useBuiltIns: 'usage',
corejs: 3,
}
]