Skip to content

Commit 414fd39

Browse files
fix: Add dependencies to optimizeDeps for improved performance and to fix bug when switching from one story to another
1 parent a10c55c commit 414fd39

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,17 @@ function VitePlugin({ dir = process.cwd() }: VitePluginOptions = {}): Plugin[] {
9191
],
9292
},
9393
}),
94+
optimizeDeps: {
95+
include: [
96+
"@mdx-js/react",
97+
"@storybook/blocks",
98+
"next/dist/compiled/react",
99+
"next/image",
100+
"next/legacy/image",
101+
"react/jsx-dev-runtime",
102+
"styled-jsx/style",
103+
],
104+
},
94105
test: {
95106
alias: {
96107
"react/jsx-dev-runtime": require.resolve(

0 commit comments

Comments
 (0)