Replies: 1 comment 1 reply
-
check if window.main is something in a standard next app |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I’m using @module-federation/nextjs-mf’s NextFederationPlugin in a Next.js application, and I encountered an issue when setting the name property to 'main'.
Here’s a simplified version of my plugin configuration:
As soon as I set name: 'main', I get an error (see attached image). The error message suggests adding the eager option, but even after setting eager: true, the error does not go away.
However, if I change the name to something else (for example, 'home'), the error disappears immediately and everything works as expected.
It seems like 'main' may be a reserved or conflicting value either within Webpack or the Next.js Module Federation integration. Has anyone else experienced this? Is there a technical reason why 'main' shouldn’t be used as a name?
Any insights or explanations would be greatly appreciated.
Thanks in advance! 🙏
Beta Was this translation helpful? Give feedback.
All reactions