mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 02:21:48 +08:00
23 lines
655 B
Plaintext
23 lines
655 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: [
|
|
{
|
|
// 👇 The directory field sets the directory your stories
|
|
directory: '../packages/stories',
|
|
// 👇 The titlePrefix field will generate automatic titles for your stories
|
|
titlePrefix: 'MyComponents',
|
|
// 👇 Storybook will load all files that contain the stories extension
|
|
files: '*.stories.*',
|
|
},
|
|
],
|
|
addons: ['@storybook/addon-essentials'],
|
|
};
|
|
|
|
export default config;
|
|
```
|