From de58553e9807359dbce207510f2804b16f379008 Mon Sep 17 00:00:00 2001 From: kaqiinono Date: Wed, 16 Oct 2024 17:57:53 +0800 Subject: [PATCH] chore: generate-cssinjs.ts run wrong in windows (#51264) --- scripts/generate-cssinjs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate-cssinjs.ts b/scripts/generate-cssinjs.ts index 62341d1a76..e16412607d 100644 --- a/scripts/generate-cssinjs.ts +++ b/scripts/generate-cssinjs.ts @@ -25,7 +25,7 @@ export const generateCssinjs = ({ key, beforeRender, render }: GenCssinjsOptions Promise.all( styleFiles.map(async (file) => { const absPath = url.pathToFileURL(file).href; - const pathArr = file.split('/'); + const pathArr = file.split(path.sep); const styleIndex = pathArr.lastIndexOf('style'); const componentName = pathArr[styleIndex - 1]; let useStyle: StyleFn = () => {};