storybook/docs/snippets/common/storybook-vite-builder-ts-configure.ts.mdx
2022-05-29 18:56:46 +08:00

19 lines
474 B
Plaintext

```ts
// .storybook/main.ts
import type { StorybookViteConfig } from '@storybook/builder-vite';
const config: StorybookViteConfig = {
stories: ['../stories/**/*.stories.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
core: {
builder: '@storybook/builder-vite',
},
async viteFinal(config, options) {
// Add your configuration here
return config;
},
};
export default config;
```