mirror of
https://github.com/ershisan99/live-bundlers.git
synced 2025-12-17 05:09:27 +00:00
initial commit
This commit is contained in:
28
.storybook/main.ts
Normal file
28
.storybook/main.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
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')))
|
||||
}
|
||||
Reference in New Issue
Block a user