mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
24 lines
568 B
Plaintext
24 lines
568 B
Plaintext
```js
|
|
// .storybook/main.js|ts
|
|
|
|
export default {
|
|
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
core: {
|
|
builder: '@storybook/builder-vite',
|
|
},
|
|
async viteFinal(config, { configType }) {
|
|
const { mergeConfig } = await import('vite');
|
|
|
|
if (configType === 'DEVELOPMENT') {
|
|
// Your development configuration goes here
|
|
}
|
|
if (configType === 'PRODUCTION') {
|
|
// Your production configuration goes here.
|
|
}
|
|
return mergeConfig(config, {
|
|
// Your environment configuration here
|
|
});
|
|
},
|
|
};
|
|
```
|