본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)17k · #10799

qiankun

하는 일

이 스킬은 qiankun을 사용해 실행 중에 불러와지는 호스트 앱과 작은 서브 앱을 만드는 방법을 설명합니다. 큰 프런트엔드를 여러 부분으로 나누려는 웹 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓여러 개의 독립된 프런트엔드 앱을 불러오는 메인 앱을 만들고 싶을 때.
  • ✓기존 Vite 앱을 마이크로 서브 앱으로 바꾸고 싶은 경우.
  • ✓React나 Vue로 마이크로 프런트엔드 로딩을 설정할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/umijs/qiankun/blob/next/skills/qiankun/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“기존 Vite React 앱을 메인 셸이 불러올 수 있는 qiankun 서브 앱으로 바꾸는 걸 도와주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 작업에 맞는 가이드를 읽고, 호스트나 서브 앱의 단계를 따릅니다. 각 부분이 서로 찾을 수 있도록 고정된 포트와 맞는 앱 이름을 사용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.

자주 묻는 질문

어떤 버전을 다루나요?

qiankun 3.x 매뉴얼이며, 3.0 정식 버전이 나오기 전까지 일부 핵심 패키지는 rc 태그를 쓴다고 알려 줍니다.

Vue도 지원하나요?

네. 스킬은 React와 Vue를 모두 다루며, 템플릿은 TypeScript로 작성되어 있습니다.

마이그레이션이나 디버깅은 어떻게 하나요?

메인 앱과 서브 앱 만들기 이외의 주제는 공식 qiankun 웹사이트와 예제를 가리킵니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
17k
순위
#10799
라이선스
MIT
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

비슷한 스킬