-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
The loadShareSync function was unable to load react. The react could not be found in federation_provider. #2280
Comments
Let me see. |
This problem is basically caused by not setting up an asynchronous entry, This part of @ScriptedAlchemy will optimize its use so that it does not need to set up an asynchronous entry |
yes this is cause by no async boundary. One can implement the AsyncBoundaryPlugin we have internally. @zhoushaw - i do think we should consider adding async boundary to the federation plugin directly so by default this issue no longer exists, then user can opt out via option? Since this is rsbuild, it will take a little more time to port this into rust - im not sure i can access these hooks from JS side. So for rsbuild, use import() in entrypoint |
I will try again by adding await and error boundary. |
What if it's handled in the internal? |
Indeed, we do not yet have support in rspack for situations where asynchronous configuration is not required |
I think you can ignore it for the time being and directly configure the asynchronous entry, because we do not yet support rspack without configuring the asynchronous entry, which may require subsequent optimization and enhancement |
I am currently using rspack for testing purpose only, later I will migrate to it. await import('./bootstrap')
export {} But what I am curious is types. I have some issue with types like below: Any suggestion? Reproduction |
Will there be any additional support for monorepos, given that our micro-frontend will rely on the turbo repo? What I'm curious about regarding monorepos is how the respack module federation remote type generation will handle those cases? |
https://module-federation.io/guide/basic/type-prompt.html#consume-type You need to declare the above where you consume the remote module so that your type is valid |
@amm834 In fact, you don't need to care whether it is in monorepo or not, its type generation will work |
Yeah remote type generation should work regardless of repo structure as long as it's configured as mentioned in our docs. @zhoushaw I'll explore porting async boundary to rust. It's a simple plugin so might not be a big issue |
Describe the bug
Reproduction
https://github.com/amm834/mfe-enhanced-reproduce/blob/main/module-fed/rsbuild.config.ts
Used Package Manager
pnpm
System Info
The text was updated successfully, but these errors were encountered: