From 99573da2c47892e3063ad2be8e2c21eda5b2f7b7 Mon Sep 17 00:00:00 2001 From: Lukasz Mierzwa Date: Fri, 20 Mar 2026 16:36:30 +0000 Subject: [PATCH] fix(ui): fix vite 8 --- ui/src/e2e/stories.tsx | 2 +- ui/vite.config.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/e2e/stories.tsx b/ui/src/e2e/stories.tsx index 92e5ad34f..9c3886793 100644 --- a/ui/src/e2e/stories.tsx +++ b/ui/src/e2e/stories.tsx @@ -668,7 +668,7 @@ const StoryRenderer = ({ storyFn }: { storyFn: () => React.ReactNode }) => ( ); const VisualTestApp = () => { - const storyName = window.location.hash.replace("#", "") || ""; + const storyName = window.location.hash.replace("#", "").split("?")[0] || ""; const storyFn = stories[storyName]; if (!storyFn) { diff --git a/ui/vite.config.ts b/ui/vite.config.ts index ec2684638..e42038ed7 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -23,6 +23,10 @@ export default defineConfig({ }, }, }, + legacy: { + // e2e tests broke after upgrade to Vite v8, this fixes it. + inconsistentCjsInterop: true, + }, build: { sourcemap: true, },