mirror of
https://github.com/penpot/penpot.git
synced 2026-06-01 13:10:21 +00:00
24 lines
574 B
TypeScript
24 lines
574 B
TypeScript
import { fileURLToPath } from 'node:url';
|
|
import { dirname } from 'node:path';
|
|
|
|
import type { StorybookConfig } from '@storybook/react-vite';
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../src/lib/**/*.@(mdx|stories.@(js|jsx|ts|tsx))'],
|
|
addons: [],
|
|
framework: {
|
|
name: getAbsolutePath('@storybook/react-vite'),
|
|
options: {
|
|
builder: {
|
|
viteConfigPath: 'vite.config.mts',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
function getAbsolutePath(value: string): any {
|
|
return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`)));
|
|
}
|
|
|
|
export default config;
|