CompatRouter has occured error with module federation #8775
Replies: 3 comments 4 replies
-
I guess your webpack config cause this issue. |
Beta Was this translation helpful? Give feedback.
-
We were struggling to get the compat package working with MFE, but ended up getting it working by making the following changes to our MFE configuration:
After making these changes, everything seemed to be working properly. |
Beta Was this translation helpful? Give feedback.
-
@cjones26 Did you finish your react-router migration? I did not find good examples of the usage of aliases with Shared Api, but it seems that what you did was basically isolate the v6 into a separate alias? How did you manage to replace the compat package by React router v6 in a non breaking manner? I mean, after getting all routes, router, etc using v6 apis, they are still consuming v5, so you would need to change the shared api deps to share react-router v6. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm trying to migrate to v6 from v5, but would be maintain some v5 funtionalities. and my project using module federation with carco plugin as host, then I saw your migration guide so I installed
react-route-dom-v5-compat
and add<CompatRouter>
in my code but its not working.please look around my code and error console below and help
library version below:
module federation config below:
Beta Was this translation helpful? Give feedback.
All reactions