catdad-experiments / catdad-experiments/libheif-js
Issue importing libheif as described in the docs.
- Dominant language
- JavaScript
- Stars
- 118
- Forks
- 10
- Avg merge
- 2h 3m
- Merged PRs (30d)
- 1
Description
According to the docs, libheif hast to be imported like this:
https://github.com/catdad-experiments/libheif-js?tab=readme-ov-file#usage
```
import libheif from 'https://cdn.jsdelivr.net/npm/libheif-js@1.19.8/libheif-wasm/libheif-bundle.mjs';
```
But this does not work (in the browser console, `libheif` is a function).
It only works if I add `window.libheif = libheif();` to the statement, why is that?
```
import libheif from 'https://cdn.jsdelivr.net/npm/libheif-js@1.19.8/libheif-wasm/libheif-bundle.mjs';
window.libheif = libheif();
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.