Dear sirs,
we have the following problem. We use the following import without the ".js" extension:
import { PdfViewerComponent as EjsPdfviewer, Magnification, Navigation, Toolbar } from "@syncfusion/ej2-vue-pdfviewer";
When we try to use the PDF preview functionality in Firefox, we get the following error:
Loading script from “<our_domain>/public/js/ej2-pdfviewer-lib/pdfium.js” with importScripts() was blocked because of a disallowed MIME type (“text/html”).
When we try the same in Chrome, we get this:
Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://odpp-t.carina.local/public/js/ej2-pdfviewer-lib/pdfium.js' failed to load.
If we add the extension ".js" to the import, we cannot build the project because of the following error:
Rollup failed to resolve import "@syncfusion/ej2-vue-pdfviewer.js" from "<our_vue_file>". This is most likely unintended because it can break your application at runtime. If you want to externalize this module explicitly add it to `build.rollupOptions.external`...
We use VUE 3
Kind regards