module-federation-examples icon indicating copy to clipboard operation
module-federation-examples copied to clipboard

CSS Isolation for the remote app

Open rk12345677 opened this issue 2 years ago • 2 comments

Hi @ScriptedAlchemy i have integrated a remote app with my host app using module federation both remote and host app is on react. i am using mini-css-extract-plugin for the css. The problem is i am using different version of library in both app due to that i am getting some css issue after loading the remote app in the host app apart from that everything works fine. Can someone help me isolating the css of the remote app from the host app so that it won't affect.

rk12345677 avatar Oct 05 '23 07:10 rk12345677

I would adjust the specificity of your css or turn on css modules if possible. It’s a nice safe guard for the future

RussellCanfield avatar Oct 05 '23 11:10 RussellCanfield

https://github.com/module-federation/module-federation-examples/tree/master/css-isolation

raymondboswel avatar Oct 18 '23 07:10 raymondboswel