Skip to content

Commit

Permalink
Merge pull request #25031 from storybookjs/25029-bug-sveltekit-hot-re…
Browse files Browse the repository at this point in the history
…load-not-working-after-upgrading-to-storybook-76

SvelteKit: Fix HMR not working
(cherry picked from commit 7ffc515)
  • Loading branch information
JReinhold authored and storybook-bot committed Nov 29, 2023
1 parent c0306c2 commit 6536867
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions code/frameworks/sveltekit/src/plugins/mock-sveltekit-stores.ts
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 6536867

Please sign in to comment.