Import Maps Playground

A real import map in a sandboxed frame: this browser itself resolves bare names, trailing-slash prefixes and scopes to URLs, with its own TypeError when it…

Why it matters

Import maps make ES modules run straight in the browser (CDNs like esm.sh, pages with no build, prototypes) and explain what a bundler really does for you. Three of their rules often surprise: subpaths need an entry ending in a slash, scopes choose by the importing module, and relative specifiers are matched as URLs.

The key idea

The map is read once per import, from the importing module’s URL

Common mistakes

Try it in this playground