Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
I

icestark

> 前端框架
Open source

:tiger: Micro Frontends solution for large application(面向大型应用的微前端解决方案),站点国内镜像:https://icestark.gitee.io

2.1K stars0 likes1 views
WebsiteGitHub

About

English | 简体中文

icestark

Micro Frontends solution for large application. Website Chinese docs.

Features

  • No framework constraint for main&sub applications, support React/Vue/Angular/...
  • Sub-application support multiple types of entry: js&css, html entry, html content
  • Compatible with single-spa sub-application and lifecycles
  • JavaScript sandbox by Proxy API

Showcases

Vue main-application

https://icestark-vue.surge.sh/

Main-application based on Vue, And sub-applications based on React, Vue respectively.

React main-application

https://icestark-react.surge.sh/

Main-application based on React, And sub-applications based on React, Vue, Angular respectively.

Architecture&Concepts

Concepts:

  • Main-application: also named framework application, responsible for sub-applications registration&load&render, layout display (Header, Sidebar, Footer, etc.)
  • Sub-application: responsible for content display related to its own business

Getting Started

Use Scaffold

Main-application:

bash
# Based on React
$ npm init ice icestark-layout @icedesign/stark-layout-scaffold
# Based on Vue
$ npm init ice icestark-layout @vue-materials/icestark-layout-app

$ cd icestark-layout
$ npm install
$ npm start

Sub-application:

bash
# Based on React
$ npm init ice icestark-child @icedesign/stark-child-scaffold
# Based on Vue
$ npm init ice icestark-child @vue-materials/icestark-child-app

$ cd icestark-child
$ npm install
$ npm run start

Main-application

setup in react app

…
  • AppRouter locates the sub-application rendering node
  • AppRoute corresponds to the configuration of a sub-application, path configures all route information, basename configures a uniform route prefix, url configures assets url
  • icestark will follow the route parsing rules like to determine the current path, load the static resources of the corresponding sub-application, and render

setup with APIs

supported by @ice/[email protected]

…

after sub-application is registered, icestark will load app according to the activePath.

Sub-application

sub-application can expose lifecycles in both register lifecycles and export lifecycles(umd) ways.

1. regsiter lifecycles

javascript
// src/index.js
import ReactDOM from 'react-dom';
import { isInIcestark, getMountNode, registerAppEnter, registerAppLeave } from '@ice/stark-app';
import router from './router';

if (isInIcestark()) {
  const mountNode = getMountNode();

  registerAppEnter(() => {
    ReactDOM.render(router(), mountNode);
  });

  // make sure the unmount event is triggered
  registerAppLeave(() => {
    ReactDOM.unmountComponentAtNode(mountNode);
  });
} else {
  ReactDOM.render(router(), document.getElementById('ice-container'));
}
  • Get the render DOM Node via getMountNode
  • Trigger app mount manually via registerAppEnter
  • Trigger app unmount manually via registerAppLeave
…
  • Get the basename configuration in the framework application via getBasename
  • renderNotFound triggers the framework application rendering global NotFound

2. exports lifecycles(umd)

exports lifecycles in sub-application:

javascript
import ReactDOM from 'react-dom';
import App from './app';

export function mount(props) {
  ReactDOM.render(<App />, document.getElementById('icestarkNode'));
}

export function unmount() {
  ReactDOM.unmountComponentAtNode(document.getElementById('icestarkNode'));
}

sub-application should be bundled as an UMD module, add the following configuration of webpack:

javascript
module.exports = {
  output: {
    library: 'sub-app-name',
    libraryTarget: 'umd',
  },
};

Documentation

https://micro-frontends.ice.work/

Contributors

        <br />
        <sub style="font-size:14px"><b>那吒</b></sub>
    </a>
</td>
<td align="center" style="word-wrap: break-word; width: 90.0; height: 90.0">
    <a href=https://github.com/ClarkXia>
        
        <br />
        <sub style="font-size:14px"><b>ClarkXia</b></sub>
    </a>
</td>
<td align="center" style="word-wrap: break-word; width: 90.0; height: 90.0">
    <a href=https://github.com/daysai>
        
        <br />
        <sub style="font-size:14px"><b>daysai</b></sub>
    </a>
</td>
<td align="center" style="word-wrap: break-word; width: 90.0; height: 90.0">
    <a href=https://github.com/imsobear>
        
        <br />
        <sub style="font-size:14px"><b>大果</b></sub>
    </a>
</td>
<td align="center" style="word-wrap: break-word; width: 90.0; height: 90.0">
    <a href=https://github.com/temper357>
        
        <br />
        <sub style="font-size:14px"><b>站稳</b></sub>
    </a>
</td>
<td align="center" style="word-wrap: break-word; width: 90.0; height: 90.0">
    <a href=https://github.com/alvinhui>
        
        <br />
        <sub style="font-size:14px"><b>许文涛</b></sub>
    </a>
</td>
<td align="center" style="word-wrap: break-word; width: 90.0; height: 90.0">
    <a href=https://github.com/skyFi>
        
        <br />
        <sub style="font-size:14px"><b>Skylor.Min</b></sub>
    </a>
</td>
<td align="center" style="word-wrap: break-word; width: 90.0; height: 90.0">
    <a href=https://github.com/liqupan>
        
        <br />
        <sub style="font-size:14px"><b>liqupan</b></sub>
    </a>
</td>

Feel free to report any questions as an issue, we'd love to have your helping hand on icestark.

License

MIT

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptfrontendmicro-frontendsmicro-frontends-solutionmicrofrontends

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架