-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[code-infra] Add missing @babel/runtime dependency to @mui/material-pigment-css #43473
Conversation
Netlify deploy previewhttps://deploy-preview-43473--material-ui.netlify.app/ Bundle size report |
Signed-off-by: Jan Potoms <2109932+Janpot@users.noreply.github.com>
@@ -93,7 +93,7 @@ module.exports = function getBabelConfig(api) { | |||
{ | |||
useESModules, | |||
// any package needs to declare 7.25.0 as a runtime dependency. default is ^7.0.0 | |||
version: '^7.25.0', | |||
version: process.env.MUI_BABEL_RUNTIME_VERSION || '^7.25.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% satisfied with this solution but the babel config is used both by our build and by babel-node
. MUI_BABEL_RUNTIME_VERSION
may not always be defined. This seemed to be the lesser of evils, the existence is already checked in the build script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the solution looks very elegant given the circumstances. 👍
Discovered in #43264, where this was breaking a build. Took the opportunity to add a check for missing
@babel/runtime
dependencies. As suggested in #43243 I'm passing this version to babel config to be used in the build.