If you're using Storybook 7.0 for React with Webpack5, it's possible to use Rspack using an experimental builder.
First, we need to add storybook-react-rspack
dependency, and uninstall the @storybook/react-webpack5
dependency.
Then, make the corresponding change to the Storybook main.js
config:
There is a example here react-storybook
Support for Storybook 7.0 is still experimental, and there are some limitations:
There is also incomplete docgen support to automatically generate controls from components.
Rspack is currently compatible with the following main.js
configuration, however this has known issues and is a work in progress.