Skip to content

Commit

Permalink
Make sure local @storybook/cli packages is used in linked mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Aug 22, 2024
1 parent 039f2e8 commit 5026a1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/tasks/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ export const sandbox: Task = {
await addStories(details, options);
}

const extraDeps = details.template.modifications?.extraDependencies ?? [];
const extraDeps = [
...(details.template.modifications?.extraDependencies ?? []),
// The storybook package forwards some CLI commands to @storybook/cli with npx.
// Adding the dep makes sure that even npx will use the linked workspace version.
'@storybook/cli',
];
if (!details.template.skipTasks?.includes('vitest-integration')) {
extraDeps.push(
'happy-dom',
Expand Down

0 comments on commit 5026a1b

Please sign in to comment.