-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Fast refresh si loaded twice #193
Comments
See discussion here #185 How do you manage to load React only one time currently? |
If I understand correctly you're question, I do load for each project individual React version, with their own /react-refresh. I am using qiankun(single-spa) setup for that, which does runtime assembly of the apps. All micro apps having its owns dev servers, setups, and have its own repos, builds etc. Prior v 4 I can override as much micro-apps as i need, with no problem. |
I released 4.0.3 without this check! |
thanks a lot!!! |
Description
As a developer using vite in an micro front end environment we do need to have multiple loads of the
@react-refresh
when we are in dev mode with multiple micro apps.In version 4 was added a
throw error
when one has multiple loads of the react-refresh which we do, because they are located on different urls, while window object is shared with all micro-apps.And window.vite_plugin_react_runtime_loaded is shared as well which will cause a throw, and any micro app after first loaded micro app will die.
Suggested solution
Could we add an option which can disable react-refresh throw
React refresh runtime was loaded twice...
?Alternative
Alternative can be not to throw but to console.warn this.
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: