Skip to main content

mapNodeMods

映射 node 模块和 hel 微模块关系,入参和mapAndPreload一样,此函数是一个同步函数,仅作映射,不会预加载 hel 模块

使用方式

多次调用mapNodeMods映射不同的 node 模块

mapNodeMods({
'@hel-demo/mono-libs': true,
});

mapNodeMods({
'hel-demo-lib1': true,
});
不能重复映射

重复映射 node 模块将导致报错

mapNodeMods({
'@hel-demo/mono-libs': true,
});

mapNodeMods({
'@hel-demo/mono-libs': { platform: 'hel' },
});