Skip to content
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

Add explicit dependency on @babel/runtime to metro-runtime #816

Closed
wants to merge 1 commit into from

Conversation

robhogan
Copy link
Contributor

@robhogan robhogan commented May 5, 2022

Summary:
Previously, babel/runtime was a transitive dependency of RN projects via metro-react-native-babel-preset -> babel/plugin-transform-regenerator.

babel/runtime is a dependency of injected babel helpers, so we need it to be a transitive dependency of an RN project under react-native.

Removing the previous implicit dependency broke RN builds, this adds the dependency to metro-runtime to make it explicit.

I've created a 0.70.x branch for Metro from 0.70.2 and will cherry pick this up as a hotfix 0.70.3 release.

Reviewed By: motiz88

Differential Revision: D36165366

Summary:
Previously, `babel/runtime` was a transitive dependency of RN projects via `metro-react-native-babel-preset` -> `babel/plugin-transform-regenerator`.

`babel/runtime` is a dependency of injected babel helpers, so we need it to be a transitive dependency of an RN project under `react-native`.

Removing the previous implicit dependency broke RN builds, this adds the dependency to `metro-runtime` to make it explicit.

I've created a 0.70.x branch for Metro from 0.70.2 and will cherry pick this up as a hotfix 0.70.3 release.

Reviewed By: motiz88

Differential Revision: D36165366

fbshipit-source-id: d7e13cf337acb88e9d9733f8caf332aa4303ab97
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels May 5, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D36165366

robhogan added a commit that referenced this pull request May 5, 2022
Hotfix adding (#816) to the 0.70.x branch
@robhogan
Copy link
Contributor Author

Not sure why the bot didn't pick this up, but this landed in 0e4cb75

@robhogan robhogan closed this May 10, 2022
@schmod
Copy link

schmod commented May 16, 2022

Would it make sense to specify a more recent version here and include it in the default value of enableBabelRuntime? This would allow projects to be opted into some (fairly substantial) bundle-size optimizations by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants