storybook/docs/snippets/common/storybook-main-baseline-setup.ts.mdx
2023-01-19 17:59:38 +00:00

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;
```