chore: generate-cssinjs.ts run wrong in windows (#51264)

This commit is contained in:
kaqiinono
2024-10-16 17:57:53 +08:00
committed by GitHub
parent 9a47f89298
commit de58553e98

View File

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