UNPKG

Guides

Everything UNPKG can do, one topic at a time. Start with loading files, or jump to the workflow you need.

GuideWhat it covers
Loading filesThe UNPKG URL pattern explained: package, version, and file; semver ranges and dist-tags; entry-point and exports resolution; directory listings.
Nobuild appsBuild browser apps with no build step: load npm dependencies directly with import maps and native ES modules from UNPKG.
Inline scriptsRun TypeScript, JSX, and TSX inline in HTML with UNPKG's /run helper: script types, data attributes, and examples.
Browser modulesesm.unpkg.com converts npm packages to browser-ready ES modules: URL format, targets, conditions, dependency overrides, JSX, CSS modules, and raw mode.
Metadata APIAppend ?meta to any UNPKG package or directory URL for JSON metadata: file paths, sizes, types, and integrity hashes.
Cache performanceHow UNPKG caching works and how to get the best hit rate: permanent exact-version URLs, redirects for ranges and tags, and verified cache entries.
Supply chain securityHow UNPKG Shield watches npm releases, pins or blocks compromised versions at the edge, and gives package owners visibility into where their code runs.

Quickstart

Load any file from any npm package with a script tag:

<script src="https://unpkg.com/preact@10.26.4/dist/preact.min.js"></script>

Pin the full version in production. For browser-ready modules see browser modules; for what's inside a package, the metadata API.