buster/web/.storybook/main.ts

26 lines
692 B
TypeScript
Raw Normal View History

2025-02-22 05:13:15 +08:00
import type { StorybookConfig } from '@storybook/nextjs';
2025-04-12 01:21:31 +08:00
import path from 'path';
2025-02-22 05:13:15 +08:00
const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions'
],
framework: {
name: '@storybook/nextjs',
options: {}
},
2025-04-12 01:21:31 +08:00
staticDirs: ['../public'],
webpackFinal: async (config) => {
config.resolve = config.resolve || {};
config.resolve.alias = {
...(config.resolve.alias || {}),
'next/navigation': path.resolve(__dirname, './mocks/next-navigation.ts')
};
return config;
}
2025-02-22 05:13:15 +08:00
};
export default config;