-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPIKE] Configure Babel to add core-js polyfills #4557
Commits on Feb 19, 2024
-
Move Babel
browserslistEnv
to config rootThis option is no longer `@babel/preset-env` specific since v7.13.0
Configuration menu - View commit details
-
Copy full SHA for 0862adf - Browse repository at this point
Copy the full SHA 0862adfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ee513f - Browse repository at this point
Copy the full SHA 4ee513fView commit details -
Workaround for Opera Mobile 73 compatibility data
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Configuration menu - View commit details
-
Copy full SHA for 6b1bf23 - Browse repository at this point
Copy the full SHA 6b1bf23View commit details -
Add Babel polyfill provider core-js
See core-js on GitHub: https://github.com/zloirock/core-js
Configuration menu - View commit details
-
Copy full SHA for a7b3563 - Browse repository at this point
Copy the full SHA a7b3563View commit details -
Exclude polyfill for ES2022 Error cause
Although this polyfill is required for feature complete Error support, we don’t use the `.cause` property yet ``` The es-shims polyfill added the following polyfills: es.error.cause { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" } ```
Configuration menu - View commit details
-
Copy full SHA for ada136d - Browse repository at this point
Copy the full SHA ada136dView commit details -
Exclude polyfill for WHATWG URL constructor
undefined
base issueAlthough this polyfill is required for bug-free `new URL('http://x', undefined)` in Safari versions < 14 with an `undefined` base, we don’t use it: ``` The corejs3 polyfill added the following polyfills: web.url { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" } web.url-search-params { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" } ```
Configuration menu - View commit details
-
Copy full SHA for f25f11c - Browse repository at this point
Copy the full SHA f25f11cView commit details -
Exclude polyfills for DOM collection iteration
Although these polyfills are required to iterate DOM collections, we always use `Array.from()` so don’t need them: ``` The corejs3 polyfill added the following polyfills: es.array.iterator { "chrome":"61", "opera":"48", "samsung":"8.2" } web.dom-collections.iterator { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" } ```
Configuration menu - View commit details
-
Copy full SHA for e5ebecd - Browse repository at this point
Copy the full SHA e5ebecdView commit details -
Ignore various fixes in supported features
For example, polyfills to fix unhandled empty space characters in ES5 `''.trim()` that would be removed in ES2015
Configuration menu - View commit details
-
Copy full SHA for 363b5f1 - Browse repository at this point
Copy the full SHA 363b5f1View commit details