$ npm i -D tailwindcss postcss autoprefixer
$ npx tailwindcss init -p
$ npx sb init --builder @storybook/builder-vite --use-npm
$ npm run test-storybook -- --watch
https://mswjs.io - Mock Service Worker
$ npm i msw msw-storybook-addon -D
$ npx msw init public/
It is required to append the following codes into the files above: .storybook/main.cjs:
...,
"staticDirs": [
"../public"
],
...
.storybook/preview.cjs
...
import { initialize, mswDecorator } from 'msw-storybook-addon';
initialize();
export const decorators = [mswDecorator];