-
-
Notifications
You must be signed in to change notification settings - Fork 92
Remove deprecated @babel/polyfill and core-js dependencies #603
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
base: master
Are you sure you want to change the base?
Conversation
|
There is no change log for this pull request yet. |
Co-authored-by: ericblade <[email protected]>
Co-authored-by: ericblade <[email protected]>
|
@copilot I see that one of the documentation notes you removed said "Should migrate to |
Good question! The advice to "migrate to core-js@3 + regenerator-runtime" was the official Babel recommendation when
Could you remove core-js entirely? Probably yes, since:
Would you like me to test removing |
|
@copilot yeah, try removing that, and let's see what happens does "last 2 versions" make sense? does that get us like 95% or more of users? or should we be targeting a little wider? |
Co-authored-by: ericblade <[email protected]>
Removed Browser coverage for "last 2 versions":
The 65% coverage sounds low, but it's because "last 2 versions" includes dead browsers (IE, BB). The modern browsers in that list (Chrome 141-142, Firefox 143-144, Safari 26, Edge 141-142) all support ES6+ natively, so polyfills weren't needed anyway. If you want to widen coverage without polyfills, consider changing the webpack config target from |
Investigates and removes
@babel/polyfillandcore-jsper #567. Both were dead dependencies - never imported anywhere in the codebase.Findings
src/ortest/files import@babel/polyfillorcore-js.babelrcuseduseBuiltIns: "entry"which only works with explicitimport "core-js/stable"at entry points - none existed@babel/plugin-transform-runtime+@babel/runtimealready injects regenerator-runtimeChanges
@babel/polyfillfromdevDependenciescore-jsfromdevDependencies.babelrcto useuseBuiltIns: false(since polyfills aren't used)DEPENDENCIES.mdto document removal rationaleBenefits
npm install[email protected](deprecated, known performance issues)Browser Coverage Note
The current webpack target
"last 2 versions"provides ~65% global coverage (includes obsolete browsers like IE 10/11). Modern browsers in that list (Chrome, Firefox, Safari, Edge) all support ES6+ natively, so polyfills weren't needed anyway. Alternative targets like"defaults"(~87%) or"> 0.5%, not dead"(~85%) could be considered for wider coverage without requiring polyfills.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.