From d6862f0bbeee785942d0aea3ab696bb6f370f6d7 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 29 Nov 2023 11:06:08 +0100 Subject: [PATCH] Merge pull request #25031 from storybookjs/25029-bug-sveltekit-hot-reload-not-working-after-upgrading-to-storybook-76 SvelteKit: Fix HMR not working (cherry picked from commit 7ffc515e79853e408a8863bcccc820e0e64df997) --- .../src/plugins/mock-sveltekit-stores.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/code/frameworks/sveltekit/src/plugins/mock-sveltekit-stores.ts b/code/frameworks/sveltekit/src/plugins/mock-sveltekit-stores.ts index 873ce8bf3517..b5e63f8591e2 100644 --- a/code/frameworks/sveltekit/src/plugins/mock-sveltekit-stores.ts +++ b/code/frameworks/sveltekit/src/plugins/mock-sveltekit-stores.ts @@ -1,17 +1,15 @@ import { resolve } from 'node:path'; -import { mergeConfig, type Plugin } from 'vite'; +import type { Plugin } from 'vite'; export function mockSveltekitStores() { return { name: 'storybook:sveltekit-mock-stores', - enforce: 'post', - config: (config) => - mergeConfig(config, { - resolve: { - alias: { - $app: resolve(__dirname, '../src/mocks/app/'), - }, + config: () => ({ + resolve: { + alias: { + $app: resolve(__dirname, '../src/mocks/app/'), }, - }), + }, + }), } satisfies Plugin; }