You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
When running a shell application that consumes remote applications using Module Federation, updates to the remote app content are not reflected in the shell app during server-side rendering (SSR). The updated content only appears after client-side hydration, and an error is logged in the browser console.
Steps to Reproduce:
Setup:
Shell app runs on port 3000.
Remote 1 app runs on port 3001.
Remote 2 app runs on port 3002.
When running pnpm start for the shell app and accessing it at localhost:3000, everything loads correctly.
When updating content in Remote 1 app (running on port 3001), we re-run pnpm start to rebuild and serve it.
After refreshing the shell app in the browser, the content from Remote 1 does not auto-update during SSR.
The content only updates after hydration, and we see the following error in the browser's console:
Uncaught Error: Minified React error #425; visit https://reactjs.org/docs/error-decoder.html?invariant=425 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
If we block JavaScript, the content from Remote 1 is not updated.
If we restart the shell app using pnpm serve (not need re-build) and refresh the browser at localhost:3000, the content from Remote 1 is updated correctly.
Expected Behavior:
The content of Remote 1 should auto-update immediately in the Shell App after rebuilding and running the Remote 1 app server. The SSR page should reflect these updates without needing to wait for hydration or a full shell app restart.
The text was updated successfully, but these errors were encountered:
quinhatpy
changed the title
Shell App Fails to Reflect Remote App Updates in SSR Until Hydration
Shell App fails to reflect Remote App updates in SSR until hydration
Feb 26, 2025
Describe the bug
Description:
When running a shell application that consumes remote applications using Module Federation, updates to the remote app content are not reflected in the shell app during server-side rendering (SSR). The updated content only appears after client-side hydration, and an error is logged in the browser console.
Steps to Reproduce:
pnpm start
for the shell app and accessing it at localhost:3000, everything loads correctly.pnpm start
to rebuild and serve it.pnpm serve
(not need re-build) and refresh the browser at localhost:3000, the content from Remote 1 is updated correctly.Expected Behavior:
The content of Remote 1 should auto-update immediately in the Shell App after rebuilding and running the Remote 1 app server. The SSR page should reflect these updates without needing to wait for hydration or a full shell app restart.
Reproduction
https://github.com/quinhatpy/react-18-ssr-rspack
Used Package Manager
pnpm
System Info
Validations
The text was updated successfully, but these errors were encountered: