Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0版本没有genesis-remote这个组件了?前端怎么调用 #62

Closed
llongst opened this issue Apr 7, 2022 · 7 comments
Closed

Comments

@llongst
Copy link

llongst commented Apr 7, 2022

2.0版本没有genesis-remote这个组件了?
`

` 2.0版本客户端还是这样调用?

@lzxb
Copy link
Contributor

lzxb commented Apr 8, 2022

2.0的使用模块联邦,所以移除了remote-view组件,你可以看下这个例子:
服务导出:
https://github.com/fmfe/genesis/blob/master/examples/ssr-mf-about/genesis.ts#L30

服务依赖声明:
https://github.com/fmfe/genesis/blob/master/examples/ssr-mf-about/genesis.ts#L39

调用其它服务的导出:
https://github.com/fmfe/genesis/blob/master/examples/ssr-mf-home/src/common/create-app-client.ts#L1

完整的可以看下这两个例子:
https://github.com/fmfe/genesis/tree/master/examples

image

@lzxb
Copy link
Contributor

lzxb commented Apr 8, 2022

可以看下文档对于模块联邦的教程:
https://github.com/fmfe/genesis/blob/master/docs/zh-CN/webpack-module-federation.md

@llongst
Copy link
Author

llongst commented Apr 8, 2022

原先用 remote,有开发说明,现在用MF,客户端调用有相关例子吗?
image

@lzxb
Copy link
Contributor

lzxb commented Apr 8, 2022

一样的 ,不区分客户端和服务端。

@llongst
Copy link
Author

llongst commented Apr 9, 2022

谢谢了,如果方便,麻烦加一下我的微信:llongst,不方便也没事

@llongst
Copy link
Author

llongst commented Apr 9, 2022

调试ssr-mf-home这个demo,出现如下错误,是什么原因?
image

@lzxb
Copy link
Contributor

lzxb commented Apr 9, 2022

已解决

@lzxb lzxb closed this as completed Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants