Home > Net >  Removing support for web in expo
Removing support for web in expo

Time:02-28

I am building a mobile app using react-native/ expo, and I was wondering if there is a way to drop support for the web, so the app cannot be run in a web browser?

CodePudding user response:

Web JS code is automatically stripped when bundled for other platforms. You can still disable the ability to open automatically from the Expo CLI by defining the platforms array in the app.json and only adding ‘ios’ and ‘android’.

You can always remove react-dom and react-native-web from the package.json, this will be the default in the future since the CLI can automatically add them if needed.

  • Related