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

react远程组件模板引入模块联邦报错 #72

Open
zygoing opened this issue Jun 19, 2023 · 6 comments
Open

react远程组件模板引入模块联邦报错 #72

zygoing opened this issue Jun 19, 2023 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@zygoing
Copy link

zygoing commented Jun 19, 2023

如题,拉下来的模板,只在webpack中配置一个模块联邦,编译打包会报错找不到模块
image

@fantasticsoul
Copy link
Collaborator

你好,发布下具体的模板链接呢,以及执行什么 npm 命令报错

@zygoing
Copy link
Author

zygoing commented Jun 19, 2023

https://github.com/hel-eco/hel-tpl-remote-react-comp-ts webpack里配置一个模块联邦,会提示找不到,运行的命令是npm run build。

@fantasticsoul
Copy link
Collaborator

你可以提供一个可复现问题的仓库吗,因为hel-micro 是不需要配置模块联邦相关插件的,不太明白你的意思,你是想在模板里引入webpack 5 模块联邦吗

@zygoing
Copy link
Author

zygoing commented Jun 20, 2023

对,是想在模板组件里引入webpack 5 模块联邦,旧有项目有个依赖组件是这么引入的,没法用hemicro改造。

@fantasticsoul
Copy link
Collaborator

你提交个可复现的仓库我看看哈。

@fantasticsoul
Copy link
Collaborator

或者你提供一个webpack 5 模块联邦的暴露子模块的模板,我基于这个加入hel-micro来做一个示例

@fantasticsoul fantasticsoul added the help wanted Extra attention is needed label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants