storybook-webpack-federation-plugin icon indicating copy to clipboard operation
storybook-webpack-federation-plugin copied to clipboard

Next.js support

Open arnaudmanaranche opened this issue 4 years ago • 3 comments

First of all thanks for this plugin !

Does this package is supporting with a Next.js project ? What to include inside the import("./bootstrap"); file ?

arnaudmanaranche avatar May 16 '20 09:05 arnaudmanaranche

I’m actively working with the next.js team and rebuilt most of next to be webpack 5 ready - they have already started merging incrementally. The collaboration with Dan Abramov, Next, and Weback delayed it a bit - but we now have fast refresh working (needed to modify the graph so modules are self aware)

ScriptedAlchemy avatar May 17 '20 08:05 ScriptedAlchemy

Lots of new docs/contents about using Module Federation with Next.js have been published:

  • https://github.com/module-federation/nextjs-mf
  • https://gist.github.com/jherr/dd10bc34448590a2661a0c6acbcc7e8a
  • https://github.com/module-federation/module-federation-examples

Maybe now it's possible to use this plugin with a Next.js project ?

Thanks @ScriptedAlchemy !

arnaudmanaranche avatar Nov 05 '20 07:11 arnaudmanaranche

It's a big hack. But it works. It could be improved to like a hashed external file instead of inlineing react into the document. But simple enough PR

ScriptedAlchemy avatar Nov 14 '20 04:11 ScriptedAlchemy