Today when I upgrade the react-pdf https://github.com/wojtekmaj/react-pdf version to 9.1.0, the pdf load failed and shows error:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec.
I have tried to upgrade the pdfjs version to 4.4.168 but still could not fixed this issue. Does anyone facing the same issue? This is the pdfjs code:
pdfjs.GlobalWorkerOptions.workerSrc = `/pdfjs-dist/4.4.168/pdf.worker.min.mjs`;
this version works fine in the local machine. But failed when I publish it to production environment.