-
-
Notifications
You must be signed in to change notification settings - Fork 544
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]: HMR fails with RSPack v0.7.1 #6740
Comments
Digging a bit more, I'm seeing #6670 and #6694 that might be related, since they're touching the |
fixed by #6730 |
Thanks for the quick fix @jerrykingxyz ! I tried with On our project, it still sometimes fails with this error: But that might be from our setup, or because we have a large code base 🤔 I will investigate a bit more and try to reproduce it, but would you know what could cause this? |
Ok so seems that using
is what makes it fail, however using
works without issue! Still weird that I can't reproduce it in https://github.com/markmssd/module-federation-runtime-shared/tree/rspack-0.7.1 though, I'll keep trying, but let me know if you have an idea of what could be wrong 🙏🏼 Edit: I've also tried with E |
FWIW I'm seeing the same issue with: {
"dependencies": {
"@module-federation/enhanced": "^0.1.18",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@rsbuild/core": "^0.7.3",
"@rsbuild/plugin-react": "^0.7.3",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"typescript": "^5.4.2"
}
} on MacOS Sonoma 14.5 (23F79) (arm) |
Hello @markmssd, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by |
About the module federation issue, we need a reproduce here, or if you really can't reproduce you can provide the config file, I will try to reproduce based on the config file once my time available |
The panic should already been fixed, try the latest nightly version |
Confirmed, the panic is fixed in the nightly, thanks @ahabhgk ! |
@ahabhgk I was finally able to reproduce the issue, there you go: https://github.com/markmssd/module-federation-runtime-shared/tree/rspack-0.7.2-canary. It's a problem only with dynamic imports. In this repro, it would be If you edit any other page, for example Also, once the error happens, you can refresh the page and then you'll be able to edit the DynamicPage without any errors anymore. That means you'll need to stop/start the app again in order to reproduce. Let me know if you need more info, I'd be glad to help further. |
Hey @ahabhgk , just checking whether you had an idea why that would happen, and if you were able to see the error on the reproducible. Also, should I re-open a new issue for it since the initial issue is technically resolved already? |
Let's move to the new issue #6773, I will take a look in the next one or two days |
System Info
MacOS 14.4.1
Details
With RSPack v0.7.1, HMR seems to have issues. Here is the stack trace:
I have included a reproducible. It is based on https://github.com/module-federation/module-federation-examples/tree/master/advanced-api/dynamic-remotes, but with upgraded RSPack.
Note that with v0.7.0, HMR worked without problem.
Reproduce link
https://github.com/markmssd/module-federation-runtime-shared/tree/rspack-0.7.1
Reproduce Steps
The text was updated successfully, but these errors were encountered: