Use Storybook for vanilla JavaScript or TypeScript projects to preview UI components while keeping your Rsbuild pipeline intact.
These steps assume you already have an Rsbuild project without a specific framework.
Install the HTML framework package to enable vanilla stories.
npm install storybook-html-rsbuild -D.storybook/main.tsimport { StorybookConfig } from 'storybook-html-rsbuild'
const config: StorybookConfig = {
framework: 'storybook-html-rsbuild',
rsbuildFinal: (config) => {
// Customize the final Rsbuild config here
return config
},
}
export default configYou're all set! Review the vanilla TypeScript sandbox to see the setup in action, and continue exploring the Storybook docs.
The framework's types.ts file documents every available option.