Merge pull request #30966 from storybookjs/no-test-no-vta

CLI: Only install Visual Test Addon if test feature is selected
This commit is contained in:
Michael Shilman 2025-03-31 02:41:26 +08:00 committed by GitHub
commit fdb13bd0fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -277,7 +277,9 @@ export async function baseGenerator(
: extraAddonPackages;
// TODO: change the semver range to '^4' when VTA 4 and SB 9 is released
extraAddonsToInstall.push('@chromatic-com/storybook@^4.0.0-0');
if (features.includes('test')) {
extraAddonsToInstall.push('@chromatic-com/storybook@^4.0.0-0');
}
// Add @storybook/addon-docs when docs feature is selected
if (features.includes('docs')) {