-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support for storybook / rsbuild / module federation setup #30
Comments
The plugin is using |
What does that mean in the end? Nothing is being done about this currently and we have to wait for rspack to support what is needed to get this working? |
I was able to get it working by injecting the dynamic import into the entry point of my bundle, similar to how it's done in storybook-module-federation, but using the rspack-plugin-virtual-module instead. I’m planning to create a PR for storybook-module-federation to add support for Rspack. However, it might take some time as this will be my first contribution to open source. Feel free to reach out if you need more clarification or if you'd like to help with the PR. |
@artieeez Nice try, while Rspack is trying to implement the built-in virtual module support in the near future. I think we could wait for that and contribute it to https://github.com/robdonn/storybook-module-federation. At the moment, may I know how you're implementing this now, but forking or some other ways? |
@fi3ework , understood. I’ll hold off on that plan for now. @nate-summercook , feel free to use this approach until a more robust solution becomes available. A quick note: I attempted using the Hoisted Runtime, but unfortunately, it didn’t work as expected. |
Good news: we got https://module-federation.io/guide/start/npm-packages.html#module-federationstorybook-addon now, you could give it a try. |
That sounds nice, however this only supports storybook v7, not v8. Opened an issue there: module-federation/core#3217 |
The addon support v8 IIUC, PLAT @nyqykk. |
The folder doesn't exist is normal in mf 1.5, i can fix it. But i think there shouldn't be any other problems except this. Can you provide a repo? @nate-summercook |
The best way is to upgrade to MF2.0, that's a great version |
|
Yes, I am trying the migration to v2.0, with some progress. Would still be nice to migrate the storybook addon properly to storybook v8, so that the warning disappears ;) |
It works with storybook8 actually, we had built some projects with it. There is something wrong in the package.json dependencies declaration. I will fix it. |
Hello there
I've got a project that makes use of module federation (just migrated from webpack to rsbuild) but now I can't get storybook to properly start up with my module federation dependency configured.
Here's the relevant part of my storybook / rsbuild config:
I don't think this library supports this usecase yet, as I'm getting errors after starting up the app.
When using webpack, I've managed to get module federation imports working by using storybook-module-federation. I suspect that this doesn't work yet because of the missing initial dynamic import. That seems to have been the issue with this similar issue here
So if I'm doing something wrong in using module federation together with storybook / rsbuild, please provide a working example or some guidance here. If it's not yet supported at all, please consider implementing it soon ❤️
The text was updated successfully, but these errors were encountered: