From 17bb9c036ec9ce104fec50e8a5620d5fd10e3fae Mon Sep 17 00:00:00 2001 From: khouwdevin Date: Wed, 26 Aug 2026 17:52:58 +0700 Subject: [PATCH] fix(dev-server): fix loading css error --- src/dev-server.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dev-server.tsx b/src/dev-server.tsx index 0fffda7..5e7c405 100644 --- a/src/dev-server.tsx +++ b/src/dev-server.tsx @@ -15,7 +15,9 @@ const themeAppearance = import.meta.env.THEME_APPEARANCE const baseProjectPath = import.meta.env.BASE_PROJECT_PATH || '' const styleSheets: string[] = import.meta.env.STYLE_SHEETS || [] -const cssFiles = styleSheets.map((ss) => `${baseProjectPath}/styles/${ss}`) +const normalizedBase = baseProjectPath.replace(/\\/g, '/') +const fsBase = normalizedBase.startsWith('/') ? normalizedBase : `/${normalizedBase}` +const cssFiles = styleSheets.map((ss) => `/@fs${fsBase}/styles/${ss}`) cssFiles.forEach((file) => { import(/* @vite-ignore */ file)