Storybook is a tool specifically designed for component debugging. It provides:
Rsbuild provides Storybook Rsbuild, which allows any Rsbuild project to use this tool for building Storybook.
Modern.js implements storybook-addon-modernjs
based on this tool. This plugin loads the Modern.js configuration file and converts it into a configuration usable by Storybook Rsbuild.
This document only provides the simplest usage. For more information, please refer to Storybook Rsbuild Modern.js Integration.
You need to install @rsbuild/core
in your project, otherwise the plugin may not work properly.
.storybook/main.ts
You can check out the example to learn how to use Storybook in Modern.js.