Pular para o conteúdo
Skillpedia
Sites e telas (frontend)17 mil · #10799

qiankun

O que ela faz

Esta skill explica como criar um app hospedeiro e apps menores que são carregados nele em tempo de execução usando o qiankun. É para desenvolvedores web que querem dividir um front-end grande em partes.

Quando usar

  • ✓Quando você quer criar um app principal que carrega vários apps de front-end separados.
  • ✓Quando você quer transformar um app Vite existente em um subapp micro.
  • ✓Quando você está configurando o carregamento micro-frontend com React ou Vue.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/umijs/qiankun/blob/next/skills/qiankun/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Me ajude a transformar meu app Vite React existente em um subapp do qiankun que um shell principal possa carregar.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente lê o guia correspondente à tarefa e depois segue as etapas do app hospedeiro ou do subapp. Usa portas fixas e nomes de app iguais para que as partes se encontrem.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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.

Perguntas frequentes

Qual versão ela cobre?

É um manual do qiankun 3.x, e observa que alguns pacotes centrais usam a tag rc até o lançamento estável do 3.0.

Ela oferece suporte a Vue além de React?

Sim. A skill cobre React e Vue, e seus templates são escritos em TypeScript.

E sobre migração ou depuração?

Para temas além de criar apps principais e subapps, a skill indica o site oficial do qiankun e os exemplos.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
17 mil
Posição no ranking
#10799
Licença
MIT
Atualizada em
31/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Skills parecidas