-
-
Notifications
You must be signed in to change notification settings - Fork 302
Antd theme is not working with nextjs module federation 8.1.0 and nextjs 14.1.4 #2317
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
Comments
Is this an issue on next 14 specifically? |
@ScriptedAlchemy This issue is not limited to Next.js version 14; it also occurs in version 13.4.8 and later. The Antd theme does not function properly with module-federation/nextjs-mf. |
This is caused by nexts own optimize package imports / modularizeImports Its not added to share scope at all. You can try doing this: Not much we can do on our end. Next is incompatible with module federation |
@ScriptedAlchemy |
Yes. Share it and it works again. |
Hello @prakashmallow, did you get it to work in the end? If you did, do you have the working version of the code? Thank you. |
Describe the bug
When using Next.js v14.1.4 along with @module-federation/nextjs-mf v8.1.0, I encountered an issue with the Ant Design (Antd) theme configuration. In this setup, the root Next.js app successfully provides the theme changes to child Next.js apps. However, while the root Next.js app consumes the theme changes, the child Next.js app only displays the default theme without incorporating the Antd theme changes.
Tried with the combination of Nextjs version 13.4.7 and @module-federation/nextjs-mf v8.1.0, Next.js v14.1.4 and @module-federation/nextjs-mf v7.0.8. But it's not working.
As a workaround, I downgraded to Next.js version 13.4.7 and @module-federation/nextjs-mf v7.0.8. With this configuration, the Antd theme changes are functioning correctly on both the root and child Next.js apps.
Note:
the below two @module-federation/nextjs-mf working fine with Nextjs all versions
@module-federation/nextjs-mf v7.0.8
@module-federation/nextjs-mf v8.1.0
Reproduction
Demo link
Root app repository
Child app 1 respository
Child app 2 respository
Used Package Manager
yarn
System Info
Validations
The text was updated successfully, but these errors were encountered: