Update PDF.js in PDF reader

This commit is contained in:
Martynas Bagdonas 2023-04-12 11:15:46 +03:00
parent 5880d62000
commit e6e424836d
3 changed files with 4 additions and 5 deletions

View file

@ -35,8 +35,7 @@ async function getPDFWorker(signatures) {
catch (e) {
await exec('npm ci', { cwd: modulePath });
await exec('npm run build', { cwd: modulePath });
// TODO: Don't copy 'cmaps' and 'standard_fonts' directories once pdf-reader is updated
await fs.copy(path.join(modulePath, 'build'), targetDir);
await fs.copy(path.join(modulePath, 'build', 'worker.js'), path.join(targetDir, 'worker.js'));
}
signatures['pdf-worker'] = { hash };
}