32 lines
1006 B
TypeScript
32 lines
1006 B
TypeScript
import { fileURLToPath } from "node:url";
|
|
import type { StorybookConfig } from "@storybook/react-vite";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ["../stories/**/*.stories.@(ts|tsx|mdx)"],
|
|
addons: ["@storybook/addon-docs", "@storybook/addon-a11y"],
|
|
framework: {
|
|
name: "@storybook/react-vite",
|
|
options: {},
|
|
},
|
|
docs: {
|
|
autodocs: "tag",
|
|
},
|
|
async viteFinal(viteConfig) {
|
|
viteConfig.plugins = [...(viteConfig.plugins ?? []), tailwindcss()];
|
|
viteConfig.resolve = {
|
|
...viteConfig.resolve,
|
|
alias: {
|
|
...viteConfig.resolve?.alias,
|
|
"@app/ui": fileURLToPath(new URL("../src/index.ts", import.meta.url)),
|
|
"@app/design-tokens": fileURLToPath(
|
|
new URL("../../design-tokens/src/tokens.css", import.meta.url),
|
|
),
|
|
},
|
|
};
|
|
return viteConfig;
|
|
},
|
|
};
|
|
|
|
export default config;
|