-
Notifications
You must be signed in to change notification settings - Fork 9
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
wrong React in remote subdependencies (require(react)) #39
Comments
@husayt Good issue, I will fix it at noon |
Also similar error when I use MUI (Material UI)
|
I have other issues too, but this is the biggest and most serious issue affecting anyone who would try do any realistic use with 3rd party libraries. |
Yes, this is a very important bug, but I didn't have time to look at it until 7 hours later. |
that is fine, i posted some other issues as well. I just wanted to say that this one is the most pressing one among them. |
@zhangHongEn you are doing great, take your time to avoid burnouts 🚀 |
Vite pre-built subdependencies cannot be proxied in the usual way. I have found a solution, but I have been too busy recently and may need to wait for two days. |
zhangHongEn@06dc35d |
I made a simple repro to test this case. Will try to commit that later. But gist of it I added another remote with
and
When running this remote on its own all works fine. But when I try to run it from another host via MF I get the same error
|
This looks very promising. Tried to test the proposed solution on the example above. Seems I am missing something, so I have to wait for proper solution. Very excited to finally get this working. Thank you |
@husayt Finally finished, the sub-dependency is running well now, thank you for finding this problem, I will test it again and issue a PR tomorrow night |
compeleted |
Thank you @zhangHongEn, but now it is completely broken for me. I tried to run latest examples and I get "Please call init first" error on both host and remote examples. Seems it is the same issue as this: #42 (comment) When i try "remoteEntry.js" I get this
|
I am not sure if this is issue with this library, vite or runtime module federation. But It works with webpack module federation.
So basically react in vite remote app works fine, react components render normally. But when I try to use Ag-grid-react I get infamous
Invalid hook call.
error.Seems the issue with right version react obtained via require inside ag-grid-react (CJS library):
@zhangHongEn you just fixed an issue for dynamic imports, maybe we also need fix for
require
The text was updated successfully, but these errors were encountered: