-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
emotion/react issue in micro frontend - "You are loading @emotion/react when it is already loaded" #2639
Comments
It's preferred to only load a single version of Emotion, just like it's preferred to only load a single version of React. It ensures that some features will work better and that you don't run into some edge cases etc. |
turns out i have to do it via webpack external in each on my micro frontend and warning is now fixed. Thank you guys and sorry for the confusion. |
hello @romeodancil I think I'm running into the same problem with a Turborepo and multiples instances of Emotion loaded in Storybook and our custom UI lib. How did you manage to configure correctly the externals key in the webpack config? |
In your import maps add this two.
And then each of your micro frontend add the following in your webpack.
It will remove the emotion react from the bundled js file and get the one from import maps. Some goes with other libraries that you want to be remove. Let me know if it works on you as well. Good luck and happy coding :) |
Hello
I keep getting this warning message in my micro frontend single spa.
i also ask this here single-spa/single-spa#943 but i got no response yet.
Anyone know how to fix this please?
Thank you guys in advance.
The text was updated successfully, but these errors were encountered: