27 lines
750 B
TypeScript
27 lines
750 B
TypeScript
import { fileURLToPath } from 'node:url'
|
|
import { dirname } from 'node:path'
|
|
import type { StorybookConfig } from '@storybook/vue3-vite'
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../stories/**/*.stories.ts', '../stories/**/*.mdx'],
|
|
addons: [getAbsolutePath('@storybook/addon-links'), getAbsolutePath('@storybook/addon-docs')],
|
|
framework: {
|
|
name: getAbsolutePath('@storybook/vue3-vite'),
|
|
options: {},
|
|
},
|
|
core: {
|
|
disableTelemetry: true,
|
|
},
|
|
viteFinal: (config) => {
|
|
if (config.build) {
|
|
config.build.chunkSizeWarningLimit = 1000
|
|
}
|
|
return config
|
|
},
|
|
}
|
|
|
|
export default config
|
|
|
|
function getAbsolutePath(value: string): string {
|
|
return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`)))
|
|
}
|