Skip to content

Commit

Permalink
return partial vite config instead of merged
Browse files Browse the repository at this point in the history
  • Loading branch information
JReinhold committed Nov 29, 2023
1 parent 9fecce2 commit f8489ef
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 f8489ef

Please sign in to comment.