Fix pdfjs SW no loading! mv pdfjs to static dist file

This commit is contained in:
2026-09-18 22:33:38 +03:00
parent a095cae1b5
commit cbd44a0516
2 changed files with 4 additions and 5 deletions

View File

@ -1,8 +1,7 @@
import * as pdfjsLib from 'pdfjs-dist';
import workerUrl from 'pdfjs-dist/build/pdf.worker.min.mjs?url';
if (typeof window !== 'undefined') {
pdfjsLib.GlobalWorkerOptions.workerSrc = workerUrl;
pdfjsLib.GlobalWorkerOptions.workerSrc = '/pdf.worker.min.mjs';
}
/**