33 lines
829 B
TypeScript
33 lines
829 B
TypeScript
import path from "path";
|
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
import type { StorybookConfig } from "@storybook/react-vite";
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ["./markdown/Overview.mdx", "../src/ui/**/*.stories.@(ts|tsx)"],
|
|
addons: [
|
|
"@storybook/addon-onboarding",
|
|
"@storybook/addon-essentials",
|
|
"@storybook/addon-interactions",
|
|
"@storybook/addon-themes",
|
|
],
|
|
framework: {
|
|
name: "@storybook/react-vite",
|
|
options: {},
|
|
},
|
|
viteFinal: async (config) => {
|
|
config.define = {
|
|
"process.env.BASE_ASSETS_PATH": JSON.stringify(
|
|
process.env.BASE_ASSETS_PATH,
|
|
),
|
|
};
|
|
config.plugins?.push(
|
|
tsconfigPaths({
|
|
projects: [path.resolve(path.dirname(__dirname), "tsconfig.json")],
|
|
}),
|
|
);
|
|
|
|
return config;
|
|
},
|
|
};
|
|
export default config;
|