Zum Inhalt springen
Skillpedia
Websites & UI (Frontend)17k · #10799

qiankun

Was er macht

Dieser Skill erklärt, wie man eine Host-App und kleinere Teil-Apps baut, die zur Laufzeit mit qiankun in sie geladen werden. Er richtet sich an Webentwickler, die ein großes Frontend in Teile aufteilen wollen.

Wann du ihn nutzt

  • ✓Wenn du eine Hauptapp bauen willst, die mehrere getrennte Frontend-Apps lädt.
  • ✓Wenn du eine bestehende Vite-App in eine Micro-Teilapp umwandeln willst.
  • ✓Wenn du das Micro-Frontend-Laden mit React oder Vue einrichtest.

Link zum Skill

https://github.com/umijs/qiankun/blob/next/skills/qiankun/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/umijs/qiankun/blob/next/skills/qiankun/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Hilf mir, meine bestehende Vite-React-App in eine qiankun-Teilapp umzuwandeln, die eine Hauptshell laden kann.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Agent liest den passenden Leitfaden für die Aufgabe und folgt dann den Schritten für die Host- oder Teilapp. Er nutzt feste Ports und passende App-Namen, damit die Teile einander finden.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

qiankun

qiankun is a micro-frontend framework: a main (host) app loads sub (micro) apps from their HTML entries at runtime, each inside a JS sandbox, with opt-in CSS isolation. This skill is the agent-facing manual for qiankun 3.x.

Task routing

Read only the reference file(s) the task at hand needs:

Task Read
Create a micro (sub) app, or convert an existing Vite app references/create-micro-app.md
Create a main (host) app references/create-main-app.md
Anything else — migration, style isolation, sandbox, debugging https://qiankun.umijs.org and examples/ in https://github.com/umijs/qiankun

Before you start

Determine these, asking the user only when not inferable from context:

  1. App type — main (host/shell) or sub (micro app).
  2. App name — lowercase letters, numbers, hyphens. The name the host registers must exactly match the name the sub app uses in its classic-mode fallback.
  3. Framework — React or Vue; TypeScript or JavaScript. Templates in the references are TS; strip types for JS.
  4. Dev port — must be fixed and unique per app, because the host hard-references it in entry. Convention: main app 7099, sub apps 7101, 7102, …

Package versions — until qiankun 3.0 stable ships, rc is the dist-tag for the core packages:

Package Dist-tag Goes in
qiankun rc main app dependencies
@qiankunjs/react / @qiankunjs/vue rc main app dependencies (optional UI binding)
@qiankunjs/bundler-plugin rc sub app devDependencies

Key facts

These invariants shape every task below:

  • Vite sub apps need no dedicated build mode. qiankun 3 loads <script type="module"> natively through its ESM sandbox — regular vite dev / vite build output is qiankun-ready as-is.
  • The JS sandbox is on by default. CSS isolation is opt-in per app via styleIsolation: true (runtime CSS @scope).
  • A sub app must stay runnable standalone: when not loaded by qiankun (window.__POWERED_BY_QIANKUN__ is undefined) it renders itself directly.
  • Always unmount what you mount. loadMicroApp returns a handle whose .unmount() must be called when the app leaves; the MicroApp component bindings do this automatically on component unmount. Unmounted instances stay cached for reuse by app name; only .unload() / unloadMicroApp(name) releases them, and the bindings never call those.
  • Webpack sub apps use @qiankunjs/bundler-plugin/webpack instead of the Vite plugin; see the docs.

After any creation task

Verify the result following the checklist at the end of the reference you used. If a browser tool is available, perform the checks yourself instead of asking the user to.

Häufige Fragen

Welche Version deckt er ab?

Es ist ein Handbuch für qiankun 3.x. Es weist darauf hin, dass einige Kernpakete den rc-Tag nutzen, bis 3.0 stabil erscheint.

Unterstützt er Vue genauso wie React?

Ja. Der Skill deckt React und Vue ab, und seine Vorlagen sind in TypeScript geschrieben.

Was ist mit Migration oder Fehlersuche?

Für Themen jenseits der Erstellung von Haupt- und Teilapps verweist der Skill auf die offizielle qiankun-Webseite und die Beispiele.

Details

Originalbeschreibung des Autors

Usage manual for building micro-frontend projects with qiankun 3.x. Use when the user wants to create a qiankun main (host) app or sub (micro) app, convert an existing Vite app into a qiankun micro app, or wire up micro-frontend loading with React/Vue.

repo: umijs/qiankun

Beliebtheit

GitHub-Sterne
17k
Platz im Ranking
#10799
Lizenz
MIT
Aktualisiert
31.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Ähnliche Skills