2023-10-03 18:49:05 +03:00
|
|
|
import {resolve} from "path";
|
2023-05-17 08:46:18 +03:00
|
|
|
import type { StorybookConfig } from "@storybook/react-vite";
|
|
|
|
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",
|
|
|
|
},
|
|
|
|
// staticDirs: ['../public/fonts'],
|
|
|
|
async viteFinal(config, options) {
|
|
|
|
config.resolve.alias = {
|
|
|
|
crypto: require.resolve('rollup-plugin-node-builtins'),
|
2023-10-03 18:49:05 +03:00
|
|
|
// @TODO: Remove this when @tryghost/nql is updated
|
|
|
|
mingo: resolve(__dirname, '../../../node_modules/mingo/dist/mingo.js')
|
2023-05-17 08:46:18 +03:00
|
|
|
}
|
|
|
|
return config;
|
|
|
|
},
|
|
|
|
};
|
|
|
|
export default config;
|