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

Bug: React 19 cannot run apps in both dev & production mode simultaneously #32030

Open
rdenman opened this issue Jan 9, 2025 · 0 comments
Open
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@rdenman
Copy link

rdenman commented Jan 9, 2025

Unable to run multiple React micro frontends (MFEs) when they don't all use the same NODE_ENV. When developing large systems using micro frontends (e.g. via module federation), it is not feasible for developers to have every MFE running locally. Instead, a proxy config can be used to pull built artifacts of existing MFEs and only run relevant apps locally. This worked well in React 18, but does not in React 19.

React version: 19

Steps To Reproduce

  1. Using some MFE solution (in my example, module federation), run a host app in dev mode (NODE_ENV === 'development') and a remote app in prod mode (NODE_ENV === 'production')
  2. Note that the runtimes are not compatible.

Link to code example: https://github.com/rdenman/react-19-mixed-env-mf

The current behavior

Unable to run mixed builds (dev + prod)

The expected behavior

Both dev and prod builds should be compatible.

This is the error I see when running the attached example. Note that downgrading the example to React 18 fixes this issue, and running both apps in either dev or prod mode also resolves the issue.
Screenshot 2025-01-08 at 7 59 06 PM

@rdenman rdenman added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

1 participant