Skip to content

Commit

Permalink
Merge pull request #20942 from storybookjs/benmccann-patch-2
Browse files Browse the repository at this point in the history
fix: remove `svelte-options` from `svelte-vite`
  • Loading branch information
JReinhold authored Feb 7, 2023
2 parents 71b0520 + edad6bc commit d7c648f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions code/frameworks/svelte-vite/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ export const viteFinal: NonNullable<StorybookConfig['viteFinal']> = async (confi
// TODO: set up eslint import to use typescript resolver
// eslint-disable-next-line import/no-unresolved
const { svelte, loadSvelteConfig } = await import('@sveltejs/vite-plugin-svelte');
const svelteOptions: Record<string, any> = await options.presets.apply(
'svelteOptions',
{},
options
);
const svelteConfig = { ...(await loadSvelteConfig()), ...svelteOptions };
const svelteConfig = await loadSvelteConfig();

// Add svelte plugin if not present
// Add svelte plugin if the user does not have a Vite config of their own
if (!(await hasVitePlugins(plugins, ['vite-plugin-svelte']))) {
plugins.push(svelte());
}
Expand Down

0 comments on commit d7c648f

Please sign in to comment.