mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Load the fake worker, in non-PRODUCTION
mode, with native async import
This removes the last SystemJS usage from both the API and the default viewer.
This commit is contained in:
parent
126f42a266
commit
d9084c0be2
2 changed files with 2 additions and 12 deletions
|
@ -1746,12 +1746,7 @@ const PDFWorker = (function PDFWorkerClosure() {
|
|||
return mainWorkerMessageHandler;
|
||||
}
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION")) {
|
||||
if (typeof SystemJS !== "object") {
|
||||
// Manually load SystemJS, since it's only necessary for fake workers.
|
||||
await loadScript("../node_modules/systemjs/dist/system.js");
|
||||
await loadScript("../systemjs.config.js");
|
||||
}
|
||||
const worker = await SystemJS.import("pdfjs/core/worker.js");
|
||||
const worker = await import("pdfjs/core/worker.js");
|
||||
return worker.WorkerMessageHandler;
|
||||
}
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue