diff options
author | Vitaly Takmazov | 2021-03-30 09:47:50 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-03-30 09:47:50 +0300 |
commit | 6b529f138b9688a55b0f4075657ff277ea991a3f (patch) | |
tree | a5b2d70d24384b34a4d844740e6e676a06fd8187 | |
parent | c9f7f4dcbe94914d411db8c4ae358ddbbff3b563 (diff) |
add missing core-js polyfills
-rw-r--r-- | src/main/assets/scripts.js | 8 | ||||
-rw-r--r-- | webpack.config.js | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/main/assets/scripts.js b/src/main/assets/scripts.js index de4669b6..7e308bc8 100644 --- a/src/main/assets/scripts.js +++ b/src/main/assets/scripts.js @@ -1,8 +1,14 @@ require('element-closest/browser'); require('classlist.js'); -require('url-polyfill'); 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 { embedLinksToX, embedAll, format } from './embed'; import renderIcons from './icon'; import svg4everybody from 'svg4everybody'; diff --git a/webpack.config.js b/webpack.config.js index d25bff51..c4fa2913 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -19,7 +19,7 @@ module.exports = (env, argv) => { module: { rules: [{ test: /\.js$/, - exclude: /node_modules/, + exclude: /@babel(?:\/|\\{1,2})runtime|core-js/, loader: 'babel-loader' }] }, |