These docs cover qiankun 3.0 (RC) — install it with npm i qiankun@rc. For 2.x, see the v2 docs.
Skip to content

Browser support ​

qiankun 3 targets modern browsers and does not support IE. The exact requirements depend on which capabilities you enable: the base runtime is the most permissive, while native ESM and style isolation each rely on newer browser features. This page is the single source of truth for browser compatibility; other pages defer to it.

Capabilities and their requirements ​

CapabilityBrowser features it relies onBrowser requirement
Base runtime (loading, classic script execution, JS sandbox)Proxy, TransformStream, URL.createObjectURLAny recent mainstream Chrome, Edge, Safari, or Firefox
Native ESM micro-apps (Native ESM support)Dynamically injected import mapsChrome/Edge 133+, Safari 18.4+; not supported in Firefox by default
Style isolation (Style isolation)Native CSS @scope, with no polyfill or fallbackChrome/Edge 118+, Safari 17.4+, Firefox 128+

The rows stack: if you only ship classic micro-apps without style isolation, the first row is all that matters; each additional capability tightens the browser matrix by its own row.

Prefer runtime detection over version lists ​

The base runtime can be detected at runtime, so there is no need to maintain a browser version list yourself:

ts
import { isRuntimeCompatible } from 'qiankun';

if (isRuntimeCompatible()) {
  // load micro-apps
}

Note that isRuntimeCompatible() only covers the three base-runtime features — it does not check dynamic import maps or CSS @scope. Evaluate style isolation separately against the table above. qiankun automatically checks dynamic multiple-import-map support before loading the first sandboxed ESM module; no additional detection API call is needed.

ESM loading capability check ​

In a separate same-origin about:blank iframe, qiankun injects an import map and executes a module, then adds a second map and executes another module. This avoids changing the host document's mappings. The probe uses local blobs without fetching external resources. Its result is reused within the host document; Classic scripts do not trigger the check. The synchronous behavior of isRuntimeCompatible() stays the same.

Handle check failures through mountPromise:

ts
import { loadMicroApp, QiankunError } from 'qiankun';

const app = loadMicroApp({ name, entry, container });
void app.mountPromise.catch((error: unknown) => {
  if (error instanceof QiankunError && error.code === 'esm-unsupported') {
    // Ask the user to use a supported browser, or select a Classic build entry.
    return;
  }
  console.error(error);
});

esm-unsupported: Required ESM sandbox capabilities are unavailable means a probe module could not use its map. An inaccessible iframe, initialization failure, enforced CSP restriction on probe scripts, or a check exceeding five seconds produces esm-capability-check-failed: ESM capability check could not complete. The latter does not establish whether the browser supports the ESM sandbox. The check does not replace CSP, CORS, or network checks for micro-app resources.

Firefox and native ESM ​

The ESM sandbox relies on injecting multiple import maps dynamically, which Firefox does not yet enable by default. qiankun 3.0 provides no ESM sandbox fallback, so ESM micro-apps require a browser with native support for dynamically injected multiple import maps.

To support Firefox, deliver micro-apps as classic scripts instead (for example a Webpack build); the base runtime and style isolation are unaffected on Firefox.

Keep reading ​

Released under the MIT License.