diff --git a/.storybook/main.ts b/.storybook/main.ts index a26f7f0de..0577782eb 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -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'] + } }); }, };