From 028652d7c0bd6a1f04308f50940fa625a517f87a Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Wed, 27 Dec 2023 14:45:28 -0300 Subject: [PATCH] Vite: Fix pre-transform error in Vite 5 --- code/builders/builder-vite/src/vite-server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/builders/builder-vite/src/vite-server.ts b/code/builders/builder-vite/src/vite-server.ts index ce4631cabaed..0b1e80435027 100644 --- a/code/builders/builder-vite/src/vite-server.ts +++ b/code/builders/builder-vite/src/vite-server.ts @@ -11,6 +11,8 @@ export async function createViteServer(options: Options, devServer: Server) { const config = { ...commonCfg, + // Needed in Vite 5: https://github.com/storybookjs/storybook/issues/25256 + assetsInclude: ['/sb-preview/**'], // Set up dev server server: { middlewareMode: true,