Fix pdfjs SW no loading! mv pdfjs to static dist file
This commit is contained in:
@ -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';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user