How can i fix a strict MIME type checking issue related to PDF rendering using PDFJS, nodejs and Firebase Hosting/Storage?

I’m trying to render PDFs stored in Firebase Storage on my website hosted on Firebase Hosting. I’m using webpack to bundle my main files (not the module’s one) and NodeJS.

When i run the website with VS Code Live Server, all is working perfectly. But when i deploy on Firebase Hosting, the render div does not show anything. Even if the module tools icons appear in the div navbar, the module is not able to load and render the pdf file due to this error:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/html”. Strict MIME type checking is enforced for module scripts per HTML spec.

Here is the content of the file that caused the issue:

export { default as DOMLocalization } from "./dom_localization.js";
export { default as Localization } from "./localization.js";

To render a pdf, my main js file (which had access to Firebase) retrieve the download link of that pdf and save it in the browser local storage. Then, I modified a pdfjs module file (app_options.js) to retrieve the link from local storage and load it as the defaultUrl. Here is the modified part:

if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
  defaultOptions.defaultUrl = {
    /** @type {string} */
    value:
      typeof PDFJSDev !== "undefined" && PDFJSDev.test("CHROME")
        ? ""
        : localStorage.getItem("copyPdfUrl"),
    kind: OptionKind.VIEWER,
  };

I’ve done some research but i found nothing. I just understand that it’s a server-side issue or a problem caused by the module syntax. So, i need your help pls!

How the fix that issue ? Is there another way to render a pdf on a web page easily and access to basic annotation tools (pen, circle, line…) ?