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 experimental transformer setting for disabling require() renaming #677
Conversation
cc @motiz88 |
Looks good! Can you share how you tested the |
1d4dc01
to
57230a9
Compare
On reflection, I'm unclear on why the new option needs to live in Seems to me that this option should either
I'm leaning towards (2) since it matches how you would configure the esbuild "serializer" (I assume) - you need to pass this flag iff you're using esbuild as your serializer, i.e. any extra degree of freedom to set this flag (either in the bundle request or |
Thanks for explaining this to me. It makes a lot of more sense now. I wasn't sure what the difference was, but we definitely want (2). I've made the appropriate changes. Please have another look. |
@motiz88 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: Draft changelog: * **[Feature]** Add option to use the Hermes parser in the transformer. (6dae163) * **[Feature]** Update the list of default React Native lazy imports to match the [removal of Picker](facebook/react-native@ad0ccac), which was already deprecated. (7dcb20d) * **[Feature]** Make the input transform options (e.g. `platform`) available to `experimentalSerializerHook` and `customSerializer`. (#679) * **[Fix]** Avoid triggering Babel scope caching bugs. (4fea2bd, 1370b7a) * **[Fix]** Fix Hermes debugger proxy for IPv6. (#662) * **[Types]** Remove documentation and types for the `postMinifyProcess` option which has been broken since Metro v0.33.0. (5d778de) * **[Experimental]** Various unstable additions to the transformer config. *These are not covered by semver and can change at any time.* (6482241, 3390274, 5b913fa, #677) Reviewed By: GijsWeterings Differential Revision: D29514800 fbshipit-source-id: 89bd4b8a53a701ceaf18867e8e9379fd3401bbbe
Summary
Adds a flag,
unstable_disableModuleWrapping
, that disables wrapping of JS modules and transformingrequire(...)
calls to$$_REQUIRE(dependencyMap[n], ...)
. This is required for plugging in third-party bundlers such as esbuild.Test plan
A test has been added to ensure that
require()
calls are untouched.