Import Maps — a JSON config inside HTML that maps bare import specifiers ("react", "lodash") to real URLs. Enables using ES modules in the browser WITHOUT a bundler. All modern browsers support (Chrome 89+, Firefox 108+, Safari 16.4+). Use cases: no-build frontend, HTMX apps, WordPress, dev-only imports.
Below: details, example, related terms, FAQ.
<!-- HTML -->
<script type="importmap">
{
"imports": {
"react": "https://esm.sh/react@18",
"react-dom": "https://esm.sh/react-dom@18",
"lodash/": "https://esm.sh/lodash/"
}
}
</script>
<script type="module">
import React from 'react'; // resolves to esm.sh
import debounce from 'lodash/debounce';
</script>For simple projects — yes. For complex apps (tree-shaking, minification, TypeScript) — still needed. Dev-only without a bundler — workable tradeoff.
esm.sh: active, fast, aggressive caching. skypack.dev: deprecated (2024). Use esm.sh or unpkg.com for 2026.
Modules need CORS headers. esm.sh, unpkg, jsdelivr — all OK. Self-hosted ES modules on CDN need proper headers.