mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 05:01:50 +08:00
37 lines
881 B
Plaintext
37 lines
881 B
Plaintext
```ts
|
|
// .storybook/main.ts
|
|
|
|
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-webpack5)
|
|
import type { StorybookConfig } from '@storybook/types';
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
|
staticDirs: ['../public'],
|
|
addons: [
|
|
'@storybook/addon-links',
|
|
'@storybook/addon-essentials',
|
|
'@storybook/preset-create-react-app',
|
|
'@storybook/addon-interactions',
|
|
],
|
|
docs: {
|
|
autodocs: 'tag',
|
|
},
|
|
framework: {
|
|
name: '@storybook/react-webpack5',
|
|
options: {},
|
|
},
|
|
babel: async (options) => ({
|
|
// Update your babel configuration here
|
|
...options,
|
|
}),
|
|
|
|
webpackFinal: async (config, { configType }) => {
|
|
// Make whatever fine-grained changes you need
|
|
// Return the altered config
|
|
return config;
|
|
},
|
|
};
|
|
|
|
export default config;
|
|
```
|