maxkomarychev / react-native-ultimate-config

Config that works
MIT License
261 stars 31 forks source link

Fix native apps using web configuration #77

Closed Menardi closed 2 years ago

Menardi commented 2 years ago

This PR should fix #76, but I haven't been able to test that it doesn't break configuration for react-native-web projects, as I have been unable to set that up. As far as I know, react-native-web projects don't use Metro for bundling, and this react-native key is specific to Metro, so it should be fine.

elliotdickison commented 2 years ago

Oh no my bad! I'm sure rn web will be fine but you can test locally by running:

1) npm run example:web:env 2) npm run example:web:start

You'll see a tab open to http://localhost:3000/ in your default browser and you'll see a screen with a spinning react logo and the text "goodbye" (loaded from .env).

Menardi commented 2 years ago

Thanks for the detailed testing instructions! I've just tested this PR, and web is showing "goodbye", so it is correctly using index.web.js.

maxkomarychev commented 2 years ago

thanks both!!

I'll merge this and issue new version in a day or two.

maxkomarychev commented 2 years ago

thanks!