Is there way to disable react-docgen in Storybook 10.3.4? #34959
Replies: 2 comments 2 replies
-
|
Setting For Storybook 10 with Rsbuild, try this in import type { StorybookConfig } from '@storybook/react-rsbuild';
const config: StorybookConfig = {
// ...
typescript: {
reactDocgen: false, // Must be here, NOT in rsbuildFinal
},
};
export default config;Common mistakes that cause docgen to still run:
addons: [
// Remove or comment out:
// '@storybook/addon-docs',
'@storybook/addon-essentials',
],
typescript: {
reactDocgen: false, // v8+
}
// vs older:
framework: {
options: {
builder: {
useSWC: true, // skips babel-based docgen
}
}
}To verify docgen is truly disabled, check your build output for @DmitriiKholodov What version of |
Beta Was this translation helpful? Give feedback.
-
|
Your config shape is the right one according to Storybook's config API: typescript: {
reactDocgen: false,
}So if docgen is still consuming most of the build time, I would first verify whether the Storybook framework preset you are using is actually reading that option. One thing that stands out is this line: framework: getAbsolutePath('storybook-react-rsbuild'),Most Storybook 10 docs/examples use the official framework package form, for example: import type { StorybookConfig } from '@storybook/react-rsbuild'
const config: StorybookConfig = {
framework: '@storybook/react-rsbuild',
typescript: {
reactDocgen: false,
},
}
export default configIf A few other checks:
So I would treat |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hello! I faced the issue that react-docgen takes 90% of build time even it is set to 'false'
Additional information
There is my current config:
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions