We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ae43fc7 + fca46e2 commit 77b8518Copy full SHA for 77b8518
1 file changed
src/utils/asyncReader.js
@@ -2,9 +2,9 @@
2
// SPDX-License-Identifier: AGPL-3.0-or-later
3
4
import { getDocument, GlobalWorkerOptions } from 'pdfjs-dist'
5
-import pdfWorkerCode from 'pdfjs-dist/build/pdf.worker.min.mjs'
6
7
-GlobalWorkerOptions.workerSrc = pdfWorkerCode
+const workerUrl = new URL('pdfjs-dist/build/pdf.worker.min.mjs', import.meta.url).href
+GlobalWorkerOptions.workerSrc = workerUrl
8
9
export function readAsArrayBuffer(file) {
10
return new Promise((resolve, reject) => {
0 commit comments