sk-matrix-project/frontend/matrix-middle-service-web/.storybook/main.ts
Shikong 5415a1dd02 项目初始化
yarn berry + vite4 + vue3 + storybook7
2023-02-25 21:58:48 +08:00

39 lines
1.0 KiB
TypeScript

import type { StorybookConfig } from "@storybook/vue3-vite";
import {mergeConfig} from "vite";
import vueConfig from "../vite.config";
const config: StorybookConfig = {
"stories": ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
core: {
builder: '@storybook/builder-vite'
},
"framework": {
name: "@storybook/vue3-vite",
options: {}
},
async viteFinal(config) {
// Merge custom configuration into the default config
return mergeConfig(config, {
// Use the same "resolve" configuration as your app
resolve: vueConfig.resolve,
// Add dependencies to pre-optimization
optimizeDeps: {
// include: ['storybook-dark-mode'],
}
});
},
"features": {
"storyStoreV7": true
},
docs: {
autodocs: true
}
};
export default config;