mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
Switch to core-js for polyfills
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env", {
|
||||
"useBuiltIns": "usage",
|
||||
"corejs": 3,
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
|
||||
@@ -29,7 +29,9 @@ export default {
|
||||
commonjs(),
|
||||
json({ indent: '' }),
|
||||
babel({
|
||||
babelHelpers: 'bundled'
|
||||
babelHelpers: 'bundled',
|
||||
// avoid circular dependencies due to `useBuiltIns: usage` option
|
||||
exclude: [/\/core-js\//]
|
||||
})
|
||||
]
|
||||
};
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import 'browser-polyfills';
|
||||
import 'es6-symbol/implement';
|
||||
// polyfills newer JS functionality for older browsers
|
||||
import 'core-js/stable';
|
||||
import 'regenerator-runtime/runtime';
|
||||
import 'string.fromcodepoint/auto';
|
||||
|
||||
// polyfill window.fetch and AbortController (not included in core-js)
|
||||
import 'whatwg-fetch';
|
||||
import 'abortcontroller-polyfill/dist/polyfill-patch-fetch';
|
||||
|
||||
// polyfill requestIdleCallback
|
||||
// polyfill idle callback functions (not included in core-js)
|
||||
window.requestIdleCallback = window.requestIdleCallback ||
|
||||
function(cb) {
|
||||
var start = Date.now();
|
||||
@@ -17,7 +19,6 @@ window.requestIdleCallback = window.requestIdleCallback ||
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
window.cancelIdleCallback = window.cancelIdleCallback ||
|
||||
function(id) {
|
||||
window.cancelAnimationFrame(id);
|
||||
|
||||
@@ -50,9 +50,8 @@
|
||||
"abortcontroller-polyfill": "^1.4.0",
|
||||
"aes-js": "^3.1.2",
|
||||
"alif-toolkit": "^1.2.9",
|
||||
"browser-polyfills": "~1.5.0",
|
||||
"core-js": "^3.6.5",
|
||||
"diacritics": "1.3.0",
|
||||
"es6-symbol": "^3.1.3",
|
||||
"fast-deep-equal": "~3.1.1",
|
||||
"fast-json-stable-stringify": "2.1.0",
|
||||
"lodash-es": "~4.17.15",
|
||||
@@ -63,7 +62,7 @@
|
||||
"pannellum": "2.5.6",
|
||||
"rbush": "3.0.1",
|
||||
"regenerator-runtime": "^0.13.7",
|
||||
"string.fromcodepoint": "1.0.0",
|
||||
"whatwg-fetch": "^3.4.1",
|
||||
"which-polygon": "2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user