umijs / qiankun

📦 🚀 Blazing fast, simple and complete solution for micro frontends.
https://qiankun.umijs.org
MIT License
15.83k stars 2.02k forks source link

子应用不能正常使用vue-pdf #1812

Open chengzhile opened 2 years ago

chengzhile commented 2 years ago

相关环境信息

github-actions[bot] commented 2 years ago

Hello @MiddleQ. In order to facilitate location and troubleshooting, we need you to provide a realistic example. Please forking these link codesandbox or clone qiankun examples to your GitHub repository.

你好 @MiddleQ, 为了方便定位和排查问题,我们需要你提供一个重现实例,请提供一个尽可能精简的链接 codesandbox 或直接 clone qiankun examples,并上传到你的 GitHub 仓库。

chengzhile commented 2 years ago

https://gitee.com/zhixuli/qiankun-vue-pdf.git

------------------ 原始邮件 ------------------ 发件人: "umijs/qiankun" @.>; 发送时间: 2021年11月16日(星期二) 上午10:26 @.>; @.**@.>; 主题: Re: [umijs/qiankun] 子应用不能正常使用vue-pdf (Issue #1812)

Hello @MiddleQ. In order to facilitate location and troubleshooting, we need you to provide a realistic example. Please forking these link codesandbox or clone qiankun examples to your GitHub repository.

你好 @MiddleQ, 为了方便定位和排查问题,我们需要你提供一个重现实例,请提供一个尽可能精简的链接 codesandbox 或直接 clone qiankun examples,并上传到你的 GitHub 仓库。

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

PhoenixMenia commented 2 years ago

这个问题解决了吗?遇到了相同的问题

chaos-zhu commented 2 years ago

qiankun是跨域请求资源,vue-pdf这个包用到的web-worker特性不支持跨域请求后执行

建议:尝试加载子应用时使用 nginx路由转发,而不是直接跨域请求

PhoenixMenia commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

a694904592 commented 2 years ago

楼主你好,我也遇到这种问题了,请问解决了吗?

PhoenixMenia commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

chengzhile commented 2 years ago

本地开发是不正常的,但是部署到服务器上是可以的

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年3月10日(星期四) 上午9:19 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [umijs/qiankun] 子应用不能正常使用vue-pdf (Issue #1812)

楼主你好,我也遇到这种问题了,请问解决了吗?

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.Message ID: @.***>

a694904592 commented 2 years ago

我就是部署到服务器上不可以,子应用单独没问题,通过主应用访问就报错

a694904592 commented 2 years ago

你那个gitee上的代码部署到服务器是可以的吗?

chengzhile commented 2 years ago

那个是issues demo 部署到服务器上理论上应该可以

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年3月10日(星期四) 上午9:31 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [umijs/qiankun] 子应用不能正常使用vue-pdf (Issue #1812)

你那个gitee上的代码部署到服务器是可以的吗?

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.Message ID: @.***>

zhaoying-zoe commented 2 years ago

https://gitee.com/zhixuli/qiankun-vue-pdf.git ------------------ 原始邮件 ------------------ 发件人: "umijs/qiankun" @.>; 发送时间: 2021年11月16日(星期二) 上午10:26 @.>; @.**@.>; 主题: Re: [umijs/qiankun] 子应用不能正常使用vue-pdf (Issue #1812) Hello @MiddleQ. In order to facilitate location and troubleshooting, we need you to provide a realistic example. Please forking these link codesandbox or clone qiankun examples to your GitHub repository. 你好 @MiddleQ, 为了方便定位和排查问题,我们需要你提供一个重现实例,请提供一个尽可能精简的链接 codesandbox 或直接 clone qiankun examples,并上传到你的 GitHub 仓库。 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

兄弟,我在csdn上找了个方法,可以解决这个vue-pdf的问题,用在你那个demo里面可以解决这个问题;但是用在我自己的项目中解决不了,醉了 哈哈

csdn地址:https://blog.csdn.net/ygxyvip/article/details/119739377

Zeral-Zhang commented 1 year ago

webpack plugin 替换为不需要 worker 的组件:

plugins.push(new webpack.NormalModuleReplacementPlugin( /vuePdfNoSss\.vue/, 'vuePdfNoSssNoWorker.vue' ))

tianshiyang commented 11 months ago

有人解决这个问题了么