-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
本地开发,链接生产环境的联邦模块时,更新内容触发热更新时,运行报错 #3201
Comments
提供下复现的 demo |
|
provider我是发布到了nginx,开了允许跨域, 访问地址如consumer中配置一样, |
这是正常的,消费者启动后,会去尝试访问生产者的 dts server,但是你这是 nginx 托管的产物,所以不会有这个 dts server ,因此报错。 这块我后面处理下错误信息,让信息更明白一点。 另外本地启动想加跨域头,不需要这么麻烦,可以设置 server.headers server: {
port:3001,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods':
'GET, POST, PUT, DELETE, PATCH, OPTIONS',
'Access-Control-Allow-Headers': '*',
},
}, 本地生产者 npm run dev , 消费者配置地址为 |
至于生产者构建的问题,你可以在生产者的目录执行 |
Describe the bug
启动会报这样的提示如上
配置如下
热更新报错如下
并且,当我构建生产者的时候,有时候会卡在build,进行不下去,一直开在如下图
Reproduction
Used Package Manager
npm
System Info
Validations
The text was updated successfully, but these errors were encountered: