module-federation-examples icon indicating copy to clipboard operation
module-federation-examples copied to clipboard

App router support

Open HesamDanaee opened this issue 1 year ago • 4 comments

I've switched from page router to the app router but on build time module federation throws error. it's main error is about react-dom which it couldn't find. I was using the 6.4.0 version of module federation and right now it's 8.1.7. did app router support was added in this version? If there is any workarounds please tell me.

HesamDanaee avatar Feb 01 '24 09:02 HesamDanaee

App router support is not there currently in the module-federation/nextjs-mf plugin https://github.com/module-federation/universe/issues/1183

You can follow this https://github.com/module-federation/universe/pull/2002 for more updates

Akshay090 avatar Feb 06 '24 11:02 Akshay090

Thanks for the response. when would they add support? I'm working on company project which is micro front-end. they asked me to add SSR to the project and I moved from pages router to app router but it just gave me build time errors. I couldn't find the issue because there was no clear error about this problem. would they consider adding app router later?

HesamDanaee avatar Feb 06 '24 12:02 HesamDanaee

Hello, does anyone know the progress on this one or if its going to be supported anytime soon?

ManuelcsNuant avatar Feb 07 '24 11:02 ManuelcsNuant

As @Akshay090 pointed out, people are trying to contribute so this can work, you can follow this https://github.com/module-federation/universe/pull/2002 to get some updates.

I think for now they only have had finished the support for the SSR part, and the react is still giving errors.

pvsfair avatar Feb 07 '24 17:02 pvsfair

No app router support. If someone sends a PR to support it, otherwise I am not working on the issue as it is low priority.

Maybe in 6 months time ill look at it again.

ScriptedAlchemy avatar Mar 05 '24 06:03 ScriptedAlchemy

If someone sends a PR to support it, but Is this not the PR that is needed ?

marshallcool avatar Mar 06 '24 11:03 marshallcool

no that does not fix it.

ScriptedAlchemy avatar Mar 07 '24 03:03 ScriptedAlchemy