Open gyrgy opened 3 months ago
The first warning about the runtime isn't a legitimate issue. Due to how we inject the v2 runtime, if multiple entries exist then the runtime initialization code is injected into each entry. Since the config hasn't actually altered it's not a concern. Im working on a PR that will get us off patching entries and instead using runtime modules to inject v2. Which will resolve this warning. It should not actually cause any interference. Next js has the same warning for example due to multi entries
Thank you for getting back to me with an explanation. I understand that even though the warning is there, it does not affect the shared contexts between the apps. I'm looking forward to the future versions where this warning will be resolved.
Regarding the other part of my report about the DTS plugin, if you'd like to move this to a separate issue, or if you're considering it as not a real problem, please feel free to close this issue. I'm happy to follow your guidance on how best to handle this part of the report.
Thank you again for your time and assistance.
For the DTS plugin, maybe something to add. If I have it turned on, my dev server just loosing the websocket connection with the browser and it's just keep trying to reconnect. Sometimes after 30s, sometimes a little later. Couldn't find a pattern, but I would say it might not be related to loading new pages or modules or any code change. It did also happen when I stayed on the same page and just waited. Couldn't debug it any further yet.
[webpack-dev-server] Disconnected! index.js:485 [webpack-dev-server] Trying to reconnect... main.js:7075 [webpack-dev-server] Disconnected! main.js:7075 [webpack-dev-server] Trying to reconnect... remoteEntryShell.js:7076 [webpack-dev-server] Disconnected! remoteEntryShell.js:7076
I'm not sure if it's related to the DTS plugin, or it's more likely an Rspack dev server issue or a mistake on my end, just wanted to add as it might be relevant.
DTS should be seperate issue. The warning may be resolved in the next few released as i have found a solution to allow us to stop patching the entry chunks, but its complex to move so i have only implemented the first stages of the upgrade
Just tried with the version 0.6.0 and Rspack 1.0. Still there, but going to try with the upcoming releases. I appreciate the effort, thank you.
They will slowly trickle down. Do you have multiple entrypoints?
I get this error with multiple remotes listed in the consumer
@shallow-alchemy do either of the remotes load the consumers "remote entry" ?
Yeah. If I comment out the second one, the first one loads. And if I comment out first one, the second one loads.
But after looking at my configuration a bit more, I am trying have two different entries from the same end point locally. These end points diverge at build time in the pipeline. But locally, only one is used, so it gets duplicated.
I think that's the issue and maybe not really a bug. Should that be possible?
I'm migrating from a vite federated module set up. It worked on that set up
If there are two "builds" or runtime from the same compilation on the page then they will have a collision due to chunk loading global stuff in webpack. Like 2 versions of remote or host runtime is from same build as remote runtime etc. Usually.
I am having a similar issue. Does this mean that you can't have container A and container B depend on each other? Circular dependency?
Should not be an issue. Supply repo
im also having problems with circular dependencies of host and remote. even tho the components they import from remote are pure components only
tags. When have such circular dependencies it seems that the apps start an import loop of death.
alltho im experiencing this problem on vite-plugin if that changes anything
@rull3211 try it with webpack or rspack or rsbuild and see if the problem still exists
@ScriptedAlchemy i tested it with rspack and i dont get the same looping as here but still breaks the app. both apps are set up locally one on localhost:3175 and the other on localhost:3713 the app is just a spimle host/remote app setup with the quick start guide with one exposed testcomponent each
Can you provide a repo I can look at
@ScriptedAlchemy here yopu go sorry tok a bit of time had to bootsrtap it https://github.com/rull3211/circularDeps this should successfully fail :) thanks for the superfast responses!
Great. Will look on Monday. Have some friends visiting this weekend.
@ScriptedAlchemy no hurry i appreciate how responsive you guys are. best dev exp with a library sofar! so thanks for that and have a nice weekend
Describe the bug
Bug: [ Federation Runtime ]: The remote "app" is already registered
Issue Description
After upgrading to version 0.2.6 (and also present in 0.3.5) of the Module Federation Plugin, I'm encountering the following warning in the browser console that wasn't present in earlier versions:
This warning appears despite using build-time federation, where I wouldn't expect runtime-related messages.
Current Setup
I'm using build-time federation and am satisfied with this setup, except for this new warning.
Investigation Steps
Simplified Test Case
I've created a simplified version of my production app structure to reproduce the issue:
Alternative Approach
I attempted to implement runtime federation. While this resolved the warning, it introduced new errors reported in Sentry:
Request for Assistance
I'd like to continue using the build-time plugin but need help resolving this warning. I'm open to contributing to the solution if needed.
Additional Information
Thank you for your time and assistance in resolving this issue.
Reproduction
https://github.com/gyrgy/mf-v035-test
Used Package Manager
npm
System Info
Validations