chore(pdfjs): copy locales during build

This commit is contained in:
Elian Doran
2025-12-29 19:07:37 +02:00
parent 6e41d3591d
commit 07a1734d4b
5 changed files with 44 additions and 3 deletions

View File

@@ -87,6 +87,15 @@ export default class BuildHelper {
}
}
writeJson(relativePath: string, data: any) {
const fullPath = join(this.outDir, relativePath);
const dirPath = fullPath.substring(0, fullPath.lastIndexOf("/"));
if (dirPath) {
mkdirpSync(dirPath);
}
writeFileSync(fullPath, JSON.stringify(data, null, 4), "utf-8");
}
}
function tryPath(paths: string[]) {