@ng-mfe/core
v0.2.0
Published
Micro-frontend kernel: engine, sandbox, event-bus, shared-state, util
Readme
@ng-mfe/core
微前端核心引擎 — 应用加载器、注册中心与生命周期管理。
安装
npm install @ng-mfe/core用法
import { MfeEngine } from '@ng-mfe/core';
const engine = new MfeEngine();
engine.registerApp({
name: 'sub-app',
entry: 'https://cdn.example.com/sub-app/index.js',
activeRule: '/sub-app',
});
engine.start();API 接口
- MfeEngine — 编排完整的微前端生命周期
- AppLoader — 加载子应用资源
- AppRegistry — 注册和管理子应用
- AssetsLoader — 加载 JS/CSS 资源并支持缓存
- PortalApplication — 门户宿主配置
- MfeConfigService — 运行时配置
文档
查看项目主页: https://github.com/echemoo/ng-mfe
