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
I'm trying to create a single store instance in the host application (federation_consumer) and use it in both the host and remote applications. However, I am experiencing an issue with infinite TypeScript type generation when using rsbuild with Module Federation v2.0.
This issue does NOT occur in Rsbuild v1.5.
It also does NOT occur in production mode (after the build is complete).
The problem seems to be related to the self-reference of the host in rsbuild.config.ts.
Steps to Reproduce
Configure rsbuild.config.ts in the host application:
importProviderButtonfrom'federation_provider/button';import{useAppStore}from'federation_consumer/store';// Importing store from self-referenceconstApp=()=>{const{ count, reset }=useAppStore();console.log(count);constonReset=()=>{reset();};return(<divclassName="content"><h1>Rsbuild with React</h1><p>Start building amazing things with Rsbuild.</p><buttononClick={onReset}>Reset</button><div><ProviderButton/></div></div>);};exportdefaultApp;
Describe the bug
I'm trying to create a single store instance in the host application (federation_consumer) and use it in both the host and remote applications. However, I am experiencing an issue with infinite TypeScript type generation when using rsbuild with Module Federation v2.0.
The problem seems to be related to the self-reference of the host in rsbuild.config.ts.
Steps to Reproduce
Reproduction
https://github.com/Voloshch/rsbuildmfe
Used Package Manager
npm
System Info
Validations
The text was updated successfully, but these errors were encountered: