From 5a45aa0cfc90d7ffc4bee4846c38c09710f1132d Mon Sep 17 00:00:00 2001 From: Emily Xiong Date: Fri, 25 Oct 2024 14:24:47 -0400 Subject: [PATCH] fix(storybook): fix externalDependencies undefined (#28641) ## Current Behavior ## Expected Behavior ## Related Issue(s) Fixes # --- packages/storybook/src/plugins/plugin.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/storybook/src/plugins/plugin.ts b/packages/storybook/src/plugins/plugin.ts index df8ba9d12957b..23cca1a5641d1 100644 --- a/packages/storybook/src/plugins/plugin.ts +++ b/packages/storybook/src/plugins/plugin.ts @@ -190,7 +190,7 @@ function buildTarget( isStorybookTestRunnerInstalled() ? '@storybook/test-runner' : undefined, - ], + ].filter(Boolean), }, ], }; @@ -210,7 +210,7 @@ function buildTarget( isStorybookTestRunnerInstalled() ? '@storybook/test-runner' : undefined, - ], + ].filter(Boolean), }, ], }; @@ -248,12 +248,7 @@ function testTarget(projectRoot: string) { options: { cwd: projectRoot }, inputs: [ { - externalDependencies: [ - 'storybook', - isStorybookTestRunnerInstalled() - ? '@storybook/test-runner' - : undefined, - ], + externalDependencies: ['storybook', '@storybook/test-runner'], }, ], };