Skip to content

Commit

Permalink
fix(vite/storybook): resolved runtime error for dynamic imports (#2389)
Browse files Browse the repository at this point in the history
  • Loading branch information
WinkeeFace authored Jan 18, 2025
1 parent b4c4f6b commit fb8ddec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ export default {
const { mergeConfig } = await import("vite");
return mergeConfig(config, {
plugins: [rawMarkdown],
optimizeDeps: {
// Pre-bundle @storybook/addon-docs/blocks to avoid runtime errors
// This is needed because MDX documentation requires these blocks to be available
// during dynamic imports
include: ['@storybook/addon-docs/blocks']
}
});
},
};

0 comments on commit fb8ddec

Please sign in to comment.