React Native for Web now exports a Babel plugin that sets up aliasing of the package and excludes any unused modules from builds. We should create a PR for create-react-app to rely on this instead of the webpack alias, as builds will be faster and smaller. AFAIK, the Jest package aliasing might also be unnecessary afterwards.
We should have something like babel-plugin-react-native-web so that create-react-app does not have to download the whole package as a dependency to setup the plugin.
The next minor release – 0.3.0 – will include a new package babel-plugin-react-native-web that will unblock this task.
Configure the preset…
It's a plugin rather than a preset
If someone wants to take this on and add it to the next release of CRA… https://github.com/facebookincubator/create-react-app/issues/3672
In progress at: facebook/create-react-app#4125
Thanks. Closing this tracking issue
Most helpful comment
The next minor release – 0.3.0 – will include a new package
babel-plugin-react-native-webthat will unblock this task.It's a plugin rather than a preset