fix: add core-js polyfill for babel preset-env useBuiltIns#7727
Open
wtfiwtz wants to merge 2 commits into
Open
fix: add core-js polyfill for babel preset-env useBuiltIns#7727wtfiwtz wants to merge 2 commits into
wtfiwtz wants to merge 2 commits into
Conversation
Add core-js@^2.6.12 as a devDependency to satisfy @babel/preset-env's useBuiltIns: "usage" configuration with corejs: 2. This resolves build-time polyfill import errors where Babel injects `import 'core-js/modules/...'` statements but the package is not installed. The babel config (client/.babelrc.js) uses: - useBuiltIns: "usage" - automatically imports polyfills based on code usage - corejs: 2 - targets core-js version 2.x Without core-js installed, the frontend build and Jest tests fail with "Cannot find module 'core-js/modules/es6.symbol.js'" errors. Note: core-js@2 is EOL. A future migration to core-js@3 is recommended, but requires updating the babel config and is out of scope for this fix. Related: split from getredash#7718 Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
This one is essential! It's been added to just about every other PR I've added here. |
This was referenced Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Description
Add
core-js@^2.6.12as a devDependency to satisfy@babel/preset-env'suseBuiltIns: "usage"configuration withcorejs: 2.This resolves build-time polyfill import errors where Babel injects
import 'core-js/modules/...'statements but the package is not installed.The babel config (
client/.babelrc.js) uses:useBuiltIns: "usage"- automatically imports polyfills based on code usagecorejs: 2- targets core-js version 2.xWithout core-js installed, the frontend build and Jest tests fail with "Cannot find module 'core-js/modules/es6.symbol.js'" errors.
Note: core-js@2 is EOL. A future migration to core-js@3 is recommended, but requires updating the babel config and is out of scope for this fix.
How is this tested?
Related Tickets & Documents
Split from #7718 per @zachliu's review feedback to separate frontend build dependency additions from Dockerfile infrastructure changes.
Part of the security vulnerability remediation work tracked in #7711.
Note
This PR is marked as draft until manual container testing is complete.
Made with Cursor