aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/assets/scripts.js8
-rw-r--r--webpack.config.js2
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'
}]
},