From 326ff0a574df4bf075d9869c322303f66f6a763d Mon Sep 17 00:00:00 2001 From: Gert Hengeveld Date: Fri, 28 Mar 2025 12:06:53 +0100 Subject: [PATCH] Only add @chromatic-com/storybook (VTA) if test feature is selected --- code/lib/create-storybook/src/generators/baseGenerator.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/lib/create-storybook/src/generators/baseGenerator.ts b/code/lib/create-storybook/src/generators/baseGenerator.ts index d55e26b2847..56c1cb637e0 100644 --- a/code/lib/create-storybook/src/generators/baseGenerator.ts +++ b/code/lib/create-storybook/src/generators/baseGenerator.ts @@ -280,7 +280,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')) {