xolvio / storybook-webpack-federation-plugin

Exposes all the components in your Storybook as Webpack 5 federated components.
MIT License
57 stars 5 forks source link

Next.js support #13

Closed arnaudmanaranche closed 1 year ago

arnaudmanaranche commented 4 years ago

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 ?

ScriptedAlchemy commented 4 years ago

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)

arnaudmanaranche commented 3 years ago

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

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

Thanks @ScriptedAlchemy !

ScriptedAlchemy commented 3 years ago

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