metro
metro copied to clipboard
Add configuration for disabling preferNativePlatform
Summary
Currently, it is impossible to disable preferNativePlatform
. This PR enables it
Test plan
In an application directory, create a blah.native.js
file, then import it in your bundle entry point without its extension. If preferNativePlatform
is enabled (or not present) in metro.config.js
, the bundle should succeed. If it is disabled, the bundle should fail.
Note
I wasn't able to fully get my local environment working and some tests and flow checks were failing. I also did not update the snapshots, which will need to be refreshed.