expo / expo/examples

Expo yarn workspaces setup doesn't work for web

Open
#264 10 comments 1 reaction 0 assignees View on GitHub
Platform: web
Dominant language
TypeScript
Stars
3.7k
Forks
1.1k
Avg merge
11h 15m
Merged PRs (30d)
1

Description

**Describe the bug**
The support for expo web in [with-yarn-workspaces example](https://github.com/expo/examples/tree/master/with-yarn-workspaces) is limited. Noticed two main issues:

- Updates in the shared package is not reflected in the web builds (even with a manual reload). To apply any change in the shared package, we need to restart the whole expo app.
- Babel is not configured out of the box for the webpack config, so using any react-native components inside the shared package causes issues. This second issue can be remedied by `dangerouslyAddModulePathsToTranspile` config inside webpack.config.js (see https://www.npmjs.com/package/@expo/webpack-config/v/0.11.4#include-modules)

**To Reproduce**
1. Install expo with template `with-yarn-workspaces`
2. Run expo web inside one of the apps
3. Make a change in one of the packages inside `packages/`
4. Observe the change not reflected.
5. Kill expo and restart to observe the change.

**Expected behavior**
Expo web should work just like the expo android and ios on the monorepo, where any change gets reflected without the need to kill expo

**Desktop (please complete the following information):**
- OS: macOS Catalina 10.15.7
- Browser Chrome v89
- Expo Version 40 (latest) with a fresh installation using the template `with-yarn-workspaces`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.