Skip to content

Commit

Permalink
Merge pull request #23472 from storybookjs/fix/improve-svelte-error
Browse files Browse the repository at this point in the history
Svelte-vite: Improve error message when sveltekit plugins are found in non-sveltekit projects
  • Loading branch information
yannbf authored Jul 17, 2023
2 parents 4c371e0 + 29a1103 commit fa8c5f6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions code/frameworks/svelte-vite/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,14 @@ export async function handleSvelteKit(plugins: PluginOption[], options: Options)
]);

if (hasSvelteKitPlugins && framework !== '@storybook/sveltekit') {
logger.error(
dedent`
throw new Error(dedent`
We've detected a SvelteKit project using the @storybook/svelte-vite framework, which is not supported in Storybook 7.0
Please use the @storybook/sveltekit framework instead.
You can migrate automatically by running
npx storybook@latest automigrate
See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework
`
);
throw new Error();
`);
}
}

0 comments on commit fa8c5f6

Please sign in to comment.