From aba86d5a7ca7cf38c1c3e347bdbd87d950dc0f4e Mon Sep 17 00:00:00 2001 From: Mikkel Georgsen Date: Tue, 31 Mar 2026 12:58:01 +0200 Subject: [PATCH] fix(05-01): switch Vite alias to array syntax with RegExp find pattern - Replace object alias syntax with array of {find, replacement} entries - '@' and 'lexical' aliases preserved as string find entries - OnboardingWizard alias uses RegExp /^\.\/components\/OnboardingWizard$/ find - RegExp matches raw import specifier from App.tsx in both dev and prod modes --- ui/vite.config.ts | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/ui/vite.config.ts b/ui/vite.config.ts index faba83a9..e0d8acb4 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -6,13 +6,20 @@ import tailwindcss from "@tailwindcss/vite"; export default defineConfig({ plugins: [react(), tailwindcss()], resolve: { - alias: { - "@": path.resolve(__dirname, "./src"), - lexical: path.resolve(__dirname, "./node_modules/lexical/Lexical.mjs"), - // [nexus] Replace upstream OnboardingWizard with Nexus single-step version - [path.resolve(__dirname, "src/components/OnboardingWizard")]: - path.resolve(__dirname, "./src/components/NexusOnboardingWizard"), - }, + alias: [ + { find: "@", replacement: path.resolve(__dirname, "./src") }, + { + find: "lexical", + replacement: path.resolve(__dirname, "./node_modules/lexical/Lexical.mjs"), + }, + // [nexus] Replace upstream OnboardingWizard with Nexus single-step version. + // RegExp required: string keys match the RAW import specifier (not resolved path). + // App.tsx imports './components/OnboardingWizard' — must match exactly. + { + find: /^\.\/components\/OnboardingWizard$/, + replacement: path.resolve(__dirname, "./src/components/NexusOnboardingWizard"), + }, + ], }, server: { port: 5173,