From fca46e241f1dcc564842cd99d5cd5c45b315fc6b Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Sun, 18 Jan 2026 16:28:31 -0300 Subject: [PATCH] fix: use url syntax for webpack Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- src/utils/asyncReader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/asyncReader.js b/src/utils/asyncReader.js index 5066c18..59cc213 100644 --- a/src/utils/asyncReader.js +++ b/src/utils/asyncReader.js @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-or-later import { getDocument, GlobalWorkerOptions } from 'pdfjs-dist' -import pdfWorkerCode from 'pdfjs-dist/build/pdf.worker.min.mjs' -GlobalWorkerOptions.workerSrc = pdfWorkerCode +const workerUrl = new URL('pdfjs-dist/build/pdf.worker.min.mjs', import.meta.url).href +GlobalWorkerOptions.workerSrc = workerUrl export function readAsArrayBuffer(file) { return new Promise((resolve, reject) => {