Updating worker file in vite for React-PDF #1909
Replies: 1 comment
-
The more i look into this the more i think it's not a problem with react-pdf but with production NGINX serving it out. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
in Vite i want to provide the pdf-worker file to run react-pdf.
I found a solution posted here: #1377
so my code looks like this currently with an import from react-pdf and pdfjs-dist
I am wondering if there is anyway to do this without having to install pdfjs-dist and maintain its version as a separate dependency?
I know i could get the file manually from the node_modules for the worker and copy it but is there a better way in Vite to do this that anyone is aware of - without installing pdfjs-dist ideally?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions