-
Notifications
You must be signed in to change notification settings - Fork 25
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
v1.0.0: Error when trying to load vite remote from webpack host. #65
Comments
Need to turn off the hmr of the react plugin Webpack host cooperates with rust remote. I guess HMR will also have problems, which requires customized special processing |
When both the host and the remote are in dev mode, you need to ensure that react-refresh is a singleton and initialized earlier than react-dom. This may require modifying @vitejs/plugin-react |
Hmr typically requires us hooking into reacts devtools global to access hmr, if that helps we have a refresh runtime plugin in one of our libraries. Hmr only works when remotes use the json protocol not the js entry |
I encountered the same problem when host ->webpack+react, remote vite+react Runtiem loading, |
I'm not sure if it will be possible to apply cross bundler HMR. Let me think about it. |
Vue React React-Refresh maintains singleton and is a dev version
…---- Replied Message ----
| From | Zack ***@***.***> |
| Date | 10/17/2024 00:25 |
| To | module-federation/vite ***@***.***> |
| Cc | zhn ***@***.***>,
Comment ***@***.***> |
| Subject | Re: [module-federation/vite] v1.0.0: Error when trying to load vite remote from webpack host. (Issue #65) |
I'm not sure if it will be possible to apply cross bundler HMR. Let me think about it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Have tried loading our vite remote with host using module federation runtime but built with webpack. Get this error when calling
loadRemote()
:Remote should be able to be loaded by webpack host, especially if using MF2 runtime.
The text was updated successfully, but these errors were encountered: