React-native-web: Update create-react-app to use babel-plugin-react-native-web

Created on 13 Sep 2017  Â·  5Comments  Â·  Source: necolas/react-native-web

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.

help

Most helpful comment

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

All 5 comments

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

Was this page helpful?
0 / 5 - 0 ratings