Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

MAUI Blazor - .mjs files in disclassified as `application/octet-stream`

$
0
0

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?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>