Skip to content

Commit c452c1d

Browse files
fix(pdfWorker): use legacy worker build for browser compatibility
The standard pdfjs-dist worker build uses Uint8Array.prototype.toHex natively, which requires Chrome 128+ and Firefox 132+. The legacy build includes a polyfill for this method, making it compatible with the browser targets declared in the project (Chrome 116+, Firefox ESR). Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent b264448 commit c452c1d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/helpers/pdfWorker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const ensurePdfWorker = (): void => {
1111
return
1212
}
1313
configured = true
14-
import('pdfjs-dist/build/pdf.worker.min.mjs?url')
14+
import('pdfjs-dist/legacy/build/pdf.worker.min.mjs?url')
1515
.then((mod) => {
1616
setWorkerPath(mod.default as string)
1717
})

0 commit comments

Comments
 (0)