resolve_cdn_cem
Fetch and cache a web component library's Custom Elements Manifest from jsDelivr or UNPKG by npm package name, without requiring a local npm install. Optionally register the manifest into a multi-library store for use with other tools.
Instructions
Fetch and cache a web component library's Custom Elements Manifest (CEM) from a CDN registry (jsDelivr or UNPKG) by npm package name. Useful when the library is loaded via CDN without a local npm install. By default (register: false) the CEM is only fetched and cached locally — server state is NOT modified. Set register: true to also register the CEM into the multi-library store for use with other tools.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes | npm package name, e.g. "@shoelace-style/shoelace" | |
| version | No | Package version, e.g. "2.15.0". Defaults to "latest". | |
| registry | No | Which CDN to use. Default: "jsdelivr". | |
| register | No | When true, registers the fetched CEM into the multi-library store. Default: false (preview only, does not mutate server state). | |
| cemPath | No | Optional path to the CEM file within the package, e.g. "dist/custom-elements.json". If omitted, tries "custom-elements.json", then "dist/custom-elements.json", then "lib/custom-elements.json". |