-
-
Notifications
You must be signed in to change notification settings - Fork 982
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Before you start - checklist
- I understand that React-PDF does not aim to be a fully-fledged PDF viewer and is only a tool to make one
- I have checked if this feature request is not already reported
Description
I guess it should be documented somewhere about worker
i don't know if it broke somewhere somehow, but i'm fine with this solution
useEffect(() => {
(async () => {
// Configure the worker source
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-expect-error
await import('pdfjs-dist/build/pdf.worker.mjs');
setWorkerLoaded(true);
})();
}, []);
Proposed solution
No response
Alternatives
No response
Additional information
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request