starter
starter copied to clipboard
External worker dependency (for Next.js)
The Next.js starter suggest an external dependency on the pdf worker:
...
<Worker workerUrl="https://unpkg.com/[email protected]/build/pdf.worker.js">
...
Since we already have the worker file in node_modules/pdfjs-dist
it would be more feasible to use the local file and avoid the external http call and to improve the integrity of pdfjs-dist version in the first place.
Any ideas what's the best approach here?
I appreciate this might not be directly related to the pdf viewer code base as such. Perhaps a separate webpack bundle with the worker could do the job here.