Skip to content

Commit

Permalink
fix svelte-vite detection for NPM workspaces
Browse files Browse the repository at this point in the history
In monorepo, the framework name will be an absolute path.

A follow up for storybookjs#23458.
  • Loading branch information
weichengpan authored and legnaleurc committed Sep 6, 2023
1 parent d627022 commit 2c88dc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/frameworks/svelte-vite/src/utils.ts
Expand Up @@ -23,7 +23,7 @@ export async function handleSvelteKit(plugins: PluginOption[], options: Options)
'vite-plugin-sveltekit-compile',
]);

if (hasSvelteKitPlugins && framework !== '@storybook/sveltekit') {
if (hasSvelteKitPlugins && !framework.endsWith('@storybook/sveltekit')) {
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.
Expand Down

0 comments on commit 2c88dc0

Please sign in to comment.