Release without lockstep
Each micro-app keeps its stack, repository, and release cadence. The host composes them at runtime.
Use loadMicroApp to mount front-end apps from different teams and frameworks wherever your product needs them. Each app keeps its own development and release cadence.
Install qiankun in the main app:
npm install qiankun@rcv3 installs from the rc tag
qiankun 3.0 is a release candidate, so npm's latest tag still resolves to 2.x. Ask for @rc explicitly to get v3.
Mount after the container exists, then keep the returned handle for status and teardown:
import { loadMicroApp } from 'qiankun';
const container = document.getElementById('micro-app-slot');
if (!container) throw new Error('micro-app-slot not found');
const microApp = loadMicroApp({
name: 'orders',
entry: '//localhost:7101',
container,
});
await microApp.mountPromise;
// When this part of the page is removed:
await microApp.unmount();The micro-app exports bootstrap, mount, and unmount; qiankun loads it into the HTMLElement and drives those lifecycles. Follow Getting started for a complete runnable setup.
For applications whose lifetime should be driven entirely by the URL, see the route-based registerMicroApps and start alternative.
A live version of the repository's example apps — two hosts driving the same set of micro-apps — runs at examples.qiankunjs.com.