Tencent / hel

A module federation SDK which is unrelated to tool chain for module consumer. 工具链无关的运行时模块联邦sdk.
https://tencent.github.io/hel/
Other
967 stars 85 forks source link

项目里需要先安装一遍 npm 远程模块才能使用吗? #44

Closed QzhouZ closed 1 year ago

QzhouZ commented 1 year ago
// mian.js
await preFetchLib("hel-tpl-remote-vue-comps");
...
// App.vue
import comps from "hel-tpl-remote-vue-comps";
image
fantasticsoul commented 1 year ago

如果不需要类型提示或不需要静态导入方式,可不安装npm包,直接

// 可获得远程模块,注意配合写为异步的vue组件哦
const comps = await preFetchLib("hel-tpl-remote-vue-comps");
fantasticsoul commented 1 year ago

close issue