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 = () => {};