Closed gaearon closed 1 year ago
@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
We also ideally need to do this for @babel/runtime
helpers. But there are a lot of those. Ideally it would be nice to be able to blocklist an entire package from inline requires. How do we feel about that?
Chose a different approach for the other change: https://github.com/facebook/metro/pull/1127
@robhogan merged this pull request in facebook/metro@c463b6446f2a7666e21bd540711fddffb1e80779.
Summary
JSX runtime calls are all over the place in every components. When using inline requires, it doesn't make sense to go through the method call + array access + property access just to call the JSX factory.
Test plan
Before (with inline requires on):
After (with inline requires on):
I added both
react/jsx-runtime
andreact/jsx-dev-runtime
even though currently RN only uses the former.