Testing

Import Maps: Browser Support, Modules, Limitations

Import maps work in Chrome 89+, Edge 89+, Firefox 108+, Safari 16.4+, Opera 76+, and Samsung Internet 15+. See key features, detection, and known issues.

Author

Prince Dewani

May 6, 2026

Import maps are a JSON-based HTML feature that lets a script type=importmap tag remap JavaScript module specifiers to URLs, defined by the WHATWG HTML Standard. They work in Chrome 89+, Edge 89+, Firefox 108+, Safari 16.4+ on macOS and iOS, Opera 76+, and Samsung Internet 15+, while Internet Explorer never added support.

This guide covers what import maps are, the browsers that support them, the key features, how to check support, and the known issues.

What are import maps?

Import maps are a WHATWG HTML feature that ship a JSON object inside a script type=importmap tag. The browser uses that JSON to remap bare module specifiers, path prefixes, and per-scope overrides for every import statement and dynamic import call on the page.

Which browsers does import maps support?

Every current Chromium, Gecko, and WebKit release supports import maps, with global support around 95%. Chrome, Edge, Firefox, Safari, Opera, and Samsung Internet all ship the feature on by default, and Internet Explorer never added support.

Loading browser compatibility data...

Import maps compatibility in Chrome

Chrome supports import maps from Chrome 89 on Windows, macOS, Linux, ChromeOS, and Android. The feature ships on by default with no flag, and the same release covers the imports and scopes keys. Chrome 127 added support for the integrity key inside the import map JSON. Chrome 4 to 88 did not support import maps.

Import maps compatibility in Edge

Microsoft Edge supports import maps from Edge 89 on Windows, macOS, and Linux. Modern Edge tracks Chrome closely, so the imports, scopes, and integrity keys land in the same Edge release as the matching Chrome version. Legacy EdgeHTML 12 to 44 did not support import maps.

Import maps compatibility in Firefox

Firefox supports import maps from Firefox 108 on Windows, macOS, Linux, and Android. The imports and scopes keys ship on by default, and Firefox 138 added support for the integrity key. Firefox 2 to 107 did not support import maps.

Import maps compatibility in Safari

Safari supports import maps from Safari 16.4 on macOS and from Safari on iOS 16.4 on iPhone and iPad. The imports and scopes keys ship on by default, and Safari 18.4 added support for the integrity key. Safari 3.1 to 16.3 did not support import maps and silently ignored the tag.

Import maps compatibility in Opera

Opera supports import maps from Opera 76 on Windows, macOS, and Linux. Opera Mobile picked up the feature from Opera Mobile 80 on Android. Both browsers track Chromium, so feature parity with Chrome holds across releases. Opera 9 to 75 did not support import maps.

Import maps compatibility in Samsung Internet

Samsung Internet supports import maps from Samsung Internet 15 on Galaxy phones and tablets. The browser tracks Chromium, so the imports and scopes keys land in the same Samsung Internet release as the matching Chromium baseline. Samsung Internet 4 to 14 did not support import maps.

Import maps compatibility in Android Browser

The legacy Android Browser did not support import maps. On modern Android phones, the stock browser is Chrome for Android, which ships import maps from Chrome 89 on every supported Android version. WebView-based apps on Android pick up import maps from the same Chromium baseline.

Import maps compatibility in Internet Explorer

Internet Explorer 11 and earlier do not support import maps or ES modules. Microsoft has retired Internet Explorer, so legacy IE pages have to ship a polyfill such as es-module-shims or rely on a webpack or Rollup bundle. Move IE-only code to Chromium-based Edge for any new work.

Note

Note: Import maps still surface quirks across Safari, Firefox, and older mobile builds. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the key features of import maps?

Import maps pack a small but powerful module-resolution layer into one JSON object. The headline features cover bare specifiers, path remapping, scoped overrides, integrity hashes, and merged maps.

  • Bare module specifiers: The imports key maps a bare name such as lodash or react to a full URL, so import lodash from "lodash" works in the browser without a bundler.
  • Path prefix remapping: An imports key that ends in a slash maps an entire directory tree, so "components/" can point at "/static/v3/components/" and pick up every nested file in one rule.
  • Scoped maps: The scopes key applies a different mapping to imports made from a specific URL prefix, so a third-party widget can pin its own version of lodash without breaking the host page.
  • Integrity metadata: The integrity key maps a resolved URL to a Subresource Integrity hash, and the browser refuses any module whose hash does not match. Chrome 127+, Firefox 138+, and Safari 18.4+ honor the key.
  • Merged import maps: A page may declare more than one script type=importmap tag, and the browser merges them in document order before any module loads.
  • Dependency pinning: A single edit to the import map URL swaps every consumer of a dependency to the new version, with no rebuild and no cache-busting trickery on the source files.
  • Feature detection: HTMLScriptElement.supports("importmap") returns true on every browser that parses the tag, and false everywhere else, so a page can fall back to es-module-shims at runtime.

How do you check if a browser supports import maps?

Run a one-line feature check in the DevTools console. The browser exposes an HTMLScriptElement.supports static method that returns true for "importmap" on every browser that honors the tag.

  • Open DevTools: Right-click any page, choose Inspect, and switch to the Console tab.
  • Paste the feature-detection snippet: Copy the snippet below and paste it into the console.
  • Run the detection: Press Enter. The console prints whether import maps are supported and appends a sample importmap tag to the document head.
  • Confirm the bare specifier works: Run import("lodash").then(m => console.log(typeof m.default)) and watch the network panel for the resolved URL.
// Paste this into the DevTools console to confirm import map support.
if (typeof HTMLScriptElement !== "undefined" &&
    typeof HTMLScriptElement.supports === "function" &&
    HTMLScriptElement.supports("importmap")) {
  console.log("Import maps are supported in this browser.");

  const map = document.createElement("script");
  map.type = "importmap";
  map.textContent = JSON.stringify({
    imports: { "lodash": "https://cdn.jsdelivr.net/npm/lodash-es@4/lodash.js" }
  });
  document.head.appendChild(map);
  console.log("Inline import map appended for the lodash bare specifier.");
} else {
  console.log("Import maps are not supported in this browser.");
}

If the console prints "Import maps are not supported in this browser", load the es-module-shims polyfill before any module imports. Chromium, Gecko, and WebKit current releases all log a positive result.

...

What are the known issues with import maps?

Import maps ship in every modern browser, but a small set of cross-browser limits still bite real projects. The common pain points are tag ordering, worker scope, single-map limits, integrity-key gaps, and Safari's late arrival.

  • Tag ordering matters: The script type=importmap tag must parse before the first module import. A tag placed below the first module load is silently ignored, and the browser falls back to bare-specifier errors.
  • One merged map per page: Browsers fold multiple import map tags into a single map, but every tag must declare before the first import. Chrome and Firefox warn in the console when a later tag is dropped.
  • Workers and worklets ignore the map: The HTML spec scopes import map resolution to the Window global, so a Worker, ServiceWorker, or AudioWorklet that imports a bare specifier still throws. The matching worker proposal is in draft.
  • Integrity key still rolling out: The integrity key landed in Chrome 127, Firefox 138, and Safari 18.4. Older releases ignore the key without a parse error, so a polyfill is needed when SRI on bare specifiers is mandatory.
  • Safari was the last engine to ship: Safari only added import maps in 16.4. Pages that need to support iOS 15 or earlier still need es-module-shims or a bundler fallback for those visitors.
  • No nested import maps inside shadow DOM: A custom element cannot scope its own import map. Every component on the page reads from the same merged map, so two components that need different versions of the same dependency need scopes URL prefixes instead.
  • Forbidden script attributes: The script type=importmap tag rejects src, async, defer, nomodule, crossorigin, integrity, and referrerpolicy attributes. The map JSON must live inline, which rules out a CDN-hosted import map file in current browsers.

In my experience, the trickiest production failure is the silent drop on a late tag. A build pipeline that injects the import map after the first inline module fails on Safari and Firefox, while Chrome warns but still resolves, so a green local test masks a broken iOS deploy. Always render the import map inside the document head before any other script tag.

...

Citations

All import maps version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests