mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-21 05:02:39 +08:00
25 lines
638 B
Plaintext
25 lines
638 B
Plaintext
```js
|
|
// .storybook/main.js|ts
|
|
|
|
const { mergeConfig } = require('vite');
|
|
|
|
module.exports = {
|
|
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, { configType }) {
|
|
if (configType === 'DEVELOPMENT') {
|
|
// Your development configuration goes here
|
|
}
|
|
if (configType === 'PRODUCTION') {
|
|
// Your production configuration goes here.
|
|
}
|
|
return mergeConfig(config, {
|
|
// Your environment configuration here
|
|
});
|
|
},
|
|
};
|
|
```
|