esm.sh
esm.sh copied to clipboard
list of all submodules for a package
I am running a self-hosted version of esm, and for certain package(s), I want to build all submodules of a package ahead of time.
Is there a way, given a package name, to list all the submodule that could be built for the package?
Eg:
GET https://esm.sh/~list/jotai
[
"/",
"/react",
"/vanilla",
]
GET https://esm.sh/jotai/
[
"react",
"vanilla",
]
How about using tailing splash?
That works!
Alternatively, it could also be a parameter of /package.json, eg:
GET https://esm.sh/[email protected]/package.json?include=modules
{
"name": "jotai",
"description": "👻 ..."
...
"modules": ["/", "/react", "/vanilla"]
}
Hey @ije is it feasible to implement? If you can share some pointer, I can also get my team to attempt and start a PR.