docs/_snippets/storybook-vite-builder-react-docgen.md
export default {
// Replace your-framework with the framework you are using (e.g., react-vite, vue3-vite, angular, etc.)
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
core: {
builder: '@storybook/builder-vite',
},
typescript: {
// Enables the `react-docgen-typescript` parser.
// See https://storybook.js.org/docs/api/main-config/main-config-typescript for more information about this option.
reactDocgen: 'react-docgen-typescript',
},
};
// Replace your-framework with the framework you are using (e.g., react-vite, vue3-vite, angular, etc.)
import type { StorybookConfig } from '@storybook/your-framework';
const config: StorybookConfig = {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
core: {
builder: '@storybook/builder-vite',
},
typescript: {
// Enables the `react-docgen-typescript` parser.
// See https://storybook.js.org/docs/api/main-config/main-config-typescript for more information about this option.
reactDocgen: 'react-docgen-typescript',
},
};
export default config;
// Replace your-framework with the framework you are using (e.g., react-vite, nextjs, nextjs-vite)
import { defineMain } from '@storybook/your-framework/node';
export default defineMain({
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
core: {
builder: '@storybook/builder-vite',
},
typescript: {
// Enables the `react-docgen-typescript` parser.
// See https://storybook.js.org/docs/api/main-config/main-config-typescript for more information about this option.
reactDocgen: 'react-docgen-typescript',
},
});
// Replace your-framework with the framework you are using (e.g., react-vite, nextjs, nextjs-vite)
import { defineMain } from '@storybook/your-framework/node';
export default defineMain({
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
core: {
builder: '@storybook/builder-vite',
},
typescript: {
// Enables the `react-docgen-typescript` parser.
// See https://storybook.js.org/docs/api/main-config/main-config-typescript for more information about this option.
reactDocgen: 'react-docgen-typescript',
},
});