diff options
author | Vitaly Takmazov | 2021-03-30 15:06:18 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-03-30 15:06:18 +0300 |
commit | b4bac6106acedf660d4b8b590ee4500ff51ec7f4 (patch) | |
tree | 54a9cbd4b2f7934fc8d2c59010271c2a52c338b9 | |
parent | 44d06eb2feac6b5189c0f7e974287015813cf111 (diff) |
babel: exclude es.symbol.* polyfills from the bundle
-rw-r--r-- | package.json | 8 | ||||
-rw-r--r-- | src/main/assets/scripts.js | 8 | ||||
-rw-r--r-- | webpack.config.js | 6 |
3 files changed, 12 insertions, 10 deletions
diff --git a/package.json b/package.json index 6f44f67a..95949459 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,12 @@ "@babel/preset-env", { "corejs": 3, - "useBuiltIns": "usage", - "modules": false + "useBuiltIns": "entry", + "modules": false, + "debug": true, + "exclude": [ + "es.symbol.*" + ] } ] ] diff --git a/src/main/assets/scripts.js b/src/main/assets/scripts.js index 7e308bc8..e801c9be 100644 --- a/src/main/assets/scripts.js +++ b/src/main/assets/scripts.js @@ -2,13 +2,7 @@ require('element-closest/browser'); require('classlist.js'); require('formdata-polyfill'); require('whatwg-fetch'); - -import 'core-js/features/url'; -import 'core-js/features/url-search-params'; -import 'core-js/modules/es.object.create'; -import 'core-js/modules/es.object.define-property'; -import 'core-js/modules/es.object.set-prototype-of'; -import 'core-js/modules/es.promise'; +import 'core-js/stable'; import { embedLinksToX, embedAll, format } from './embed'; import renderIcons from './icon'; import svg4everybody from 'svg4everybody'; diff --git a/webpack.config.js b/webpack.config.js index c4fa2913..a9329712 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -19,7 +19,11 @@ module.exports = (env, argv) => { module: { rules: [{ test: /\.js$/, - exclude: /@babel(?:\/|\\{1,2})runtime|core-js/, + exclude: [ + /\bnode_modules\b/, + /\bcore-js\b/, + /\bwebpack\/buildin\b/ + ], loader: 'babel-loader' }] }, |