docs/api/main-config/main-config-build.mdx
Parent: main.js|ts configuration
Type: TestBuildConfig
Provides configuration options to optimize Storybook's production build output.
testType: TestBuildFlags
{
disableBlocks?: boolean;
disabledAddons?: string[];
disableMDXEntries?: boolean;
disableAutoDocs?: boolean;
disableDocgen?: boolean;
disableSourcemaps?: boolean;
disableTreeShaking?: boolean;
}
Configures Storybook's production builds for performance testing purposes by disabling certain features from the build. When running storybook build, this feature is enabled by setting the --test flag.
The options documented on this page are automatically enabled when the --test flag is provided to the storybook build command. We encourage you to override these options only if you need to disable a specific feature for your project or if you are debugging a build issue.
test.disableBlocksType: boolean
Excludes the @storybook/addon-docs/blocks module from the build, which generates automatic documentation with Docs Blocks.
test.disabledAddonsType: string[]
Sets the list of addons that will be disabled in the build output.
<CodeSnippets path="main-config-test-disable-disableaddons.md" />test.disableMDXEntriesType: boolean
Enabling this option removes user-written documentation entries in MDX format from the build.
<CodeSnippets path="main-config-test-disable-mdx.md" />test.disableAutoDocsType: boolean
Prevents automatic documentation generated with the autodocs feature from being included in the build.
<CodeSnippets path="main-config-test-disable-autodocs.md" />test.disableDocgenType: boolean
Disables automatic argType and component property inference with any of the supported static analysis tools based on the framework you are using.
<CodeSnippets path="main-config-test-disable-docgen.md" />test.disableSourcemapsType: boolean
Overrides the default behavior of generating source maps for the build.
<CodeSnippets path="main-config-test-disable-sourcemaps.md" />test.disableTreeShakingType: boolean
Disables tree shaking in the build.
<CodeSnippets path="main-config-test-disable-treeshaking.md" />