chore(deps): remove unused @babel/runtime-corejs3 dependency#11586
Merged
slorber merged 3 commits intofacebook:mainfrom Dec 4, 2025
Merged
chore(deps): remove unused @babel/runtime-corejs3 dependency#11586slorber merged 3 commits intofacebook:mainfrom
slorber merged 3 commits intofacebook:mainfrom
Conversation
The @docusaurus/babel package lists @babel/runtime-corejs3 as a dependency, but it is not used anywhere in the codebase: 1. The Babel preset explicitly sets `corejs: false` in the transform-runtime plugin configuration 2. The absoluteRuntime path points to @babel/runtime, not @babel/runtime-corejs3 3. No source files import from @babel/runtime-corejs3 This dependency brings in core-js-pure, which executes a postinstall script during npm install. Removing unused dependencies that run install scripts helps reduce supply chain attack surface. Fixes facebook#11585
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
Collaborator
|
Thanks, I'll check that as soon as our GitHub actions are back |
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.
Description
Removes the unused
@babel/runtime-corejs3dependency from@docusaurus/babel.Evidence this dependency is unused
The Babel preset explicitly disables corejs in transform-runtime:
In
packages/docusaurus-babel/src/preset.ts:No source code imports from
@babel/runtime-corejs3- a code search only returns hits in CHANGELOG.md and package.jsonThe polyfill strategy uses
@babel/preset-envwithuseBuiltIns: 'entry'andcorejs: '3', which uses regularcore-js(global polyfills), not@babel/runtime-corejs3(sandboxed polyfills)Why this matters
@babel/runtime-corejs3depends oncore-js-pure, which executes apostinstallscript duringnpm install. Removing unused dependencies that run install scripts helps reduce supply chain attack surface.Test plan
Fixes #11585