mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-20 04:20:38 +09:00
33 lines
922 B
TypeScript
33 lines
922 B
TypeScript
|
|
import path from "node:path";
|
||
|
|
import { fileURLToPath } from "node:url";
|
||
|
|
import type { StorybookConfig } from "@storybook/react-vite";
|
||
|
|
import tailwindcss from "@tailwindcss/vite";
|
||
|
|
import { mergeConfig } from "vite";
|
||
|
|
|
||
|
|
const storybookConfigDir = path.dirname(fileURLToPath(import.meta.url));
|
||
|
|
|
||
|
|
const config: StorybookConfig = {
|
||
|
|
stories: ["../stories/**/*.stories.@(ts|tsx|mdx)"],
|
||
|
|
staticDirs: ["../../public"],
|
||
|
|
addons: ["@storybook/addon-docs", "@storybook/addon-a11y"],
|
||
|
|
framework: {
|
||
|
|
name: "@storybook/react-vite",
|
||
|
|
options: {},
|
||
|
|
},
|
||
|
|
docs: {
|
||
|
|
autodocs: true,
|
||
|
|
},
|
||
|
|
viteFinal: async (baseConfig) =>
|
||
|
|
mergeConfig(baseConfig, {
|
||
|
|
plugins: [tailwindcss()],
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
"@": path.resolve(storybookConfigDir, "../../src"),
|
||
|
|
lexical: path.resolve(storybookConfigDir, "../../node_modules/lexical/Lexical.mjs"),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
}),
|
||
|
|
};
|
||
|
|
|
||
|
|
export default config;
|