Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WebPack to build and serve the Web version of the example #113

Open
JoseLion opened this issue Sep 18, 2023 · 0 comments
Open

Use WebPack to build and serve the Web version of the example #113

JoseLion opened this issue Sep 18, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@JoseLion
Copy link
Member

In the example app, we support React Native Web using the Metro bundler with the metro.config.web.js configuration to create a bundled JS file to consume it from the index.html. This is not ideal for two reasons:

  1. We are only creating a bundle that can be used directly at production, so we don't have a way to handle everything related to web development (assets, code splitting, CSS/styling, etc.).
  2. We don't have a real development server, we just use a static server to serve the bundled JS on the index.html

Known issues

The main reason we started with a static server was that the example project is a workspace on a mono repo, so we need to find a way to consume react-native-spotlight-tour from another workspace and be able to replace all references to react-native imports with react-native-web. For iOS and Android, we use rnx-kit to solve this problem. But the web structure is different and rnx-kit doesn't seem to work as expected.

@JoseLion JoseLion added enhancement New feature or request help wanted Extra attention is needed labels Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant