diff --git a/src/util/components.ts b/src/util/components.ts index 2db0f5e830ad381..7a613f4932e72c1 100644 --- a/src/util/components.ts +++ b/src/util/components.ts @@ -33,7 +33,11 @@ export async function getComponentsUsage( ); for (const file of files) { - const fullName = file.parentPath + "/" + file.name; + const parentPath = + process.platform === "win32" + ? file.parentPath.replaceAll("\\", "/") + : file.parentPath; + const fullName = parentPath + "/" + file.name; const content = await readFile(fullName, "utf8"); if (!content.includes("import")) continue; @@ -85,7 +89,11 @@ export async function getPartialsUsage(): Promise> { ); for (const file of files) { - const fullName = file.parentPath + "/" + file.name; + const parentPath = + process.platform === "win32" + ? file.parentPath.replaceAll("\\", "/") + : file.parentPath; + const fullName = parentPath + "/" + file.name; const content = await readFile(fullName, "utf8"); if (!content.includes("import")) continue;