mirror of
https://github.com/ershisan99/live-bundlers.git
synced 2025-12-16 12:33:38 +00:00
29 lines
745 B
TypeScript
29 lines
745 B
TypeScript
import { dirname, join } from 'path'
|
|
import { StorybookConfig } from '@storybook/react-vite'
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(ts|tsx)'],
|
|
addons: [
|
|
getAbsolutePath('@storybook/addon-links'),
|
|
getAbsolutePath('@storybook/addon-interactions'),
|
|
getAbsolutePath('@storybook/addon-essentials'),
|
|
],
|
|
framework: {
|
|
name: getAbsolutePath('@storybook/react-vite'),
|
|
options: {},
|
|
},
|
|
docs: {
|
|
autodocs: true,
|
|
},
|
|
viteFinal: config => {
|
|
config.build = config.build || {}
|
|
config.build.sourcemap = false
|
|
return config
|
|
},
|
|
}
|
|
export default config
|
|
|
|
function getAbsolutePath(value: string): any {
|
|
return dirname(require.resolve(join(value, 'package.json')))
|
|
}
|