Closed pointersbad closed 1 month ago
Don't add the RNW plugin to the Babel config used to process the RN bundle
That's how it's showcased in the docs; of course I tried removing it too, but unfortunately no luck :( Could it be something different?
Is there an existing issue for this?
Describe the issue
The problem is I try to build a fresh ejected project using react-native-web. Somehow, all the imports on native platforms still import react-native-web instead of react-native. I have tried everything and at this point it seems like some kind of voodoo magic to me, because sometimes the imports work properly and sometimes not. Everything works fine on the browser side though.
Expected behavior
Should import react-native on ios/android and react-native-web on web.
Steps to reproduce
babel.config.js:
package.json:
The alias for react-native-web is in my webpack.config.js and I even tried deleting the web folder completely but the issue still persists on the native devices.
Test case
N/A
Additional comments
Thanks for looking into it in advance!