hel
hel copied to clipboard
消费方报错
export default function HomePage() {
useEffect(() => {
bindReactRuntime({ React, ReactDOM });
}, []);
return (
<div>
<button
onClick={() => {
preFetchLib("hel-tpl-remote-react-comps-ts", {
custom: { host: "http://localhost:3103", enable: !!location.port }
})
.then((res) => {
console.log("远程包", res);
})
.catch(console.log);
}}
>
test
</button>
</div>
);
}
hel-tpl-remote-react-comps-ts 就是仓库里的模板,没做过改动