umijs /qiankun

📦 🚀 Blazing fast, simple and complete solution for micro frontends.

★ 16,703⑂ 2,053👁 220⑃ 931● 2,096▤ 147
TypeScriptMITCreated 2019-05-15qiankun.umijs.org
More from this author
Download: v2.10.16qiankun-2.10.16 ↓2.10.162023-11-15
+0
Daily
16,703
stars
2,053
forks
220
watchers
931
prs
2,096
issues
147
releases

README

Documentation ·
  Quick start ·
  Live examples ·
  Roadmap



  English · 简体中文


 qiankun(乾坤)

 [!WARNING]

 🚧 qiankun 3.0 is currently under active development — check out the Roadmap for details. Looking for qiankun 2.x? Its documentation lives at v2.qiankun.umijs.org.

 In Chinese, qian(乾) means heaven and kun(坤) earth. qiankun is the universe.

Qiankun enables you and your teams to build next-generation and enterprise-ready web applications leveraging Micro Frontends. It is inspired by and based on single-spa.

 🤔 Motivation

A quick recap about the concept of Micro Frontends:

 Techniques, strategies and recipes for building a modern web app with multiple teams using different JavaScript frameworks. — Micro Frontends

Qiankun was birthed internally in our group during the time web app development by distributed teams had turned to complete chaos. We faced every problem micro frontend was conceived to solve, so naturally, it became part of our solution.

The path was never easy, we stepped on every challenge there could possibly be. Just to name a few:

- In what form do micro-apps publish static resources?
- How does the framework integrate individual micro-apps?
- How to ensure that sub-applications are isolated from one another (development independence and deployment independence) and runtime sandboxed?
- Performance issues? What about public dependencies?
- The list goes on long ...

After solving these common problems of micro frontends and lots of polishing and testing, we extracted the minimal viable framework of our solution, and named it qiankun, as it can contain and serve anything. Not long after, it became the cornerstone of hundreds of our web applications in production, and we decided to open-source it to save you the suffering.

TLDR: Qiankun is probably the most complete micro-frontend solution you ever met🧐.

 ✨ Features

Qiankun inherits the fundamentals of single-spa — independent deployment, lazy loading, and a technology-agnostic host that never dictates a micro app's stack — and adds the pieces a real product needs:

- 📄 HTML entry — point qiankun at a URL, not a manifest of assets. The entry HTML is streamed into the container as it arrives and can appear progressively before the response finishes.
- 🧳 JS sandbox — enabled by default through a Proxy-membrane view of window and document. Global property writes stay local, and tracked timers, event listeners, and dynamic resources are cleaned up on unmount.
- 📦 Native ESM —  micro apps execute as real modules, routed through the membrane with dynamically injected import maps. Dynamic import() works, and so does a Vite dev server.
- 🛡 Style isolation — opt-in runtime scoping built on the CSS @scope at-rule, including external stylesheets. No rewriting your CSS, no Shadow DOM tax.
- ⚡ Automatic preloading — automatically discovers and preloads scripts and stylesheets while streaming the HTML entry. The pre-activation prefetch API prefetchApps is kept for backward compatib

Top issues

Discussions

Latest release

v2.10.16 v2.10.16 2023-11-15
- ⚡️ remove object spread operator for faster performance in big array iterator (2812)  e75952fa

https://github.com/kuitos/qiankun/compare/v2.10.15...v2.10.16

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON