I'm trying to include the Prebuilt PDFjs files into our project.I am including them via script tag as recommended by the library like so:
<script src="pdfjs/build/pdf.mjs" type="module"></script><script src="pdfjs/web/viewer.mjs" type="module"></script>The problem is that they cannot be loaded:
pdf.mjs:1 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.Just using pdfjs/build/pdf.mjs and changing the file extension to js works to display a file.Changing the extension on pdfjs/web/viewer.mjs for deeper functionality does not work anymore.
I would like to follow this example, but I would need to enable .mjs files in MAUI Blazor.
Is there a workaround for that?