Replies: 1 comment
-
Actually I think I got it working now. Had a weird error that caused a 500 error in the remote app when exporting the components locally but that went away sort of on its own. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
First I acknowledge that the nextjs-mf is problematic to begin with and may no longer be supported. I also acknowledge the suggestion to use a different stack and I just was able to receive permissions (sorry work for a large company) to explore that option but not sure we have the time to do it.
So here is the issue. I was using
"@module-federation/nextjs-mf": "7.0.8",
and everything was fine for a POC of using MFE support in our current Next JS project.I updated to the newest version 8 and everything sort of broke. Unfortunately again working for a large company I cannot really share the repository as is but I will do my best to describe what we are doing.
So our division uses NextJS to write our cart application but we want to separate out our payments to allow access to other divisions. So I did a POC using MFE to show how to do it in NextJS and then had to write a script wrapper so another division could include it using a
<script />
tag. This was actually working in the POC (all apps were small and simple but it worked) with version 7.0.8. Then I upgraded to8.1.10
and used the new"dev": "NEXT_PRIVATE_LOCAL_WEBPACK=true next dev -p 3125"
and the two NextJS apps worked fine but the script wrapper started to get the wholeeager
issue for react. Yes I did include external webpack to use with the feature above.This is all with NextJS 14.... but not sure if there are any ideas on what changed and how to fix this? Sorry for the lack of being able to share things but work will not allow even small things to be shared. I was surprised when the architecture team even gave me permission to explore ModernJS mentioned in the plugin if that was a better fit for the team.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions