From f69b5d5dca46fb86e759c5022f822c1d2215699a Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Thu, 28 Dec 2023 16:52:13 -0300 Subject: [PATCH] Merge pull request #25329 from storybookjs/yann/pre-transform-error-vite-5 Vite: Fix pre-transform error in Vite 5 (cherry picked from commit aa0b69cc7d47aeabc5cea38db35c466cfffbb3a9) --- 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,