From bbe220f42943f66a3799b3e00589341a8185c31a Mon Sep 17 00:00:00 2001 From: Adrien Foulon <6115458+Tofandel@users.noreply.github.com> Date: Thu, 15 Jan 2026 18:07:09 +0100 Subject: [PATCH] fix(vite): fix windows path separator for static copy targets --- packages/vite/configuration/base.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/vite/configuration/base.ts b/packages/vite/configuration/base.ts index 7905256e6d..aabca98f4e 100644 --- a/packages/vite/configuration/base.ts +++ b/packages/vite/configuration/base.ts @@ -230,10 +230,11 @@ export const baseConfig = ({ mode, flavor }: { mode: string; flavor?: string }): const fontsDir = resolveFromAppRoot('fonts'); const staticCopyTargets = []; if (existsSync(assetsDir)) { - staticCopyTargets.push({ src: `${assetsDir}/**/*`, dest: 'assets' }); + // Replace \ with / to avoid issues with glob in windows + staticCopyTargets.push({ src: `${assetsDir}/**/*`.replace(/\\/g,'/'), dest: 'assets' }); } if (existsSync(fontsDir)) { - staticCopyTargets.push({ src: `${fontsDir}/**/*`, dest: 'fonts' }); + staticCopyTargets.push({ src: `${fontsDir}/**/*`.replace(/\\/g,'/'), dest: 'fonts' }); } let disableOptimizeDeps = false;