vite-plugin-federation
vite-plugin-federation copied to clipboard
All shared dependencies are being fetched multiple times, not working as single instance ..
Hi All,
I am getting React error as below when I have already listed react, react-dom, react-router as shared in both host and remote Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
Having the same issue! Do you have the same use case as this one: #449 ? Do you have modules being both host and remote?
For more information I have the following setup
Remote vite config
Remote exposed register function
In host I just called the register function to mount the remote app. This is different from the example where instead of just importing the remote component, instead I invoke a method to load the remote application
Downgraded to version 1.1.14 and its working. Latest version seems to be broken
Downgraded to version 1.1.14 and its working. Latest version seems to be broken
we have a different problem back in 1.1.14, it's the shared does not have checksum at the end which cause the caching error - a big reason why I had to upgrade to 1.3.*
I am switching to rspack soon. A lot of native module federation support going to happen there! This package looks like it’s being abandoned