A module federation SDK which is unrelated to tool chain for module consumer.
npm install hel-micro
模块联邦 sdk 化,构建工具无关的微模块方案。 doc: https://tnfe.github.io/hel
相比Module Federation,需要升级构建工具并做各种改造,hel只需要安装 sdk 即可
``bash`
npm i hel-micro
之后即可在项目里加载远程模块
`js
import helMicro from 'hel-micro';
export async function callRemoteMethod() {
// 懒加载模式,用时才加载
const lib = await helMicro.preFetchLib('remote-lib-tpl');
return lib.num.random(22);
}
``
查看文档 https://tnfe.github.io/hel