I'm trying to run libheif.js directly into an HTML page, but I'm getting the following error: libheif.HeifDecoder is not a constructor. Any ideas on what the problem is?
index.html
<script type="module" src="image_parser.js"></script>
<script type="module">
import libheif from 'https://cdn.jsdelivr.net/npm/libheif-js@1.17.1/libheif-wasm/libheif-bundle.mjs';
</script>
image_parser.js
import libheif from 'https://cdn.jsdelivr.net/npm/libheif-js@1.17.1/libheif-wasm/libheif-bundle.mjs';
const decoder = new libheif.HeifDecoder();
I'm trying to run libheif.js directly into an HTML page, but I'm getting the following error: libheif.HeifDecoder is not a constructor. Any ideas on what the problem is?
index.html
image_parser.js