Closed weaverryan closed 8 months ago
Hi!
Fixes #28. Using:
import { Idiomorph } from "idiomorph/dist/idiomorph.esm";
already works, as indicated by the README.md file. However, by adding the module key, users in a module environment will simply be able to say:
module
import { Idiomorph } from "idiomorph";
Additionally, some CDN's like jsdelivr package an ESM version. As you can see, the current version is an empty file - https://cdn.jsdelivr.net/npm/idiomorph@0.3.0/+esm - the reason being that they look for the module key to know which file to use (see Locating entry points on https://github.com/jsdelivr/jsdelivr/issues/18263 ).
Locating entry points
I am not an absolute expert on this topic, but I'm fairly confident with this PR.
Thanks!
Hi!
Fixes #28. Using:
already works, as indicated by the README.md file. However, by adding the
module
key, users in a module environment will simply be able to say:Additionally, some CDN's like jsdelivr package an ESM version. As you can see, the current version is an empty file - https://cdn.jsdelivr.net/npm/idiomorph@0.3.0/+esm - the reason being that they look for the
module
key to know which file to use (seeLocating entry points
on https://github.com/jsdelivr/jsdelivr/issues/18263 ).I am not an absolute expert on this topic, but I'm fairly confident with this PR.
Thanks!