2024-12-11 16:55:58 +02:00
|
|
|
import type { StorybookConfig } from "@storybook/react-vite";
|
|
|
|
import path from 'path';
|
|
|
|
|
|
|
|
const config: StorybookConfig = {
|
|
|
|
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
|
|
|
|
addons: [
|
|
|
|
"@storybook/addon-links",
|
|
|
|
"@storybook/addon-essentials",
|
|
|
|
"@storybook/addon-interactions",
|
|
|
|
{
|
|
|
|
name: '@storybook/addon-styling',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
framework: {
|
|
|
|
name: "@storybook/react-vite",
|
|
|
|
options: {},
|
|
|
|
},
|
|
|
|
docs: {
|
|
|
|
autodocs: "tag",
|
|
|
|
},
|
|
|
|
async viteFinal(config, options) {
|
|
|
|
config.resolve!.alias = {
|
|
|
|
...config.resolve!.alias,
|
|
|
|
'@': path.resolve(__dirname, '../src'),
|
|
|
|
crypto: require.resolve('rollup-plugin-node-builtins')
|
|
|
|
}
|
|
|
|
return config;
|
2024-12-19 12:01:08 +01:00
|
|
|
},
|
2024-12-11 16:55:58 +02:00
|
|
|
};
|
|
|
|
export default config;
|