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

请问microApp提供的资源共享的缓存机制是什么呢 #1374

Open
z15227174666s opened this issue Sep 19, 2024 · 0 comments
Open

请问microApp提供的资源共享的缓存机制是什么呢 #1374

z15227174666s opened this issue Sep 19, 2024 · 0 comments

Comments

@z15227174666s
Copy link

  • 第一个问题:
    请问microApp提供的资源共享的两种方式globalAssetsglobal属性,是基于浏览器缓存实现的吗。文档内的公共缓存指的是浏览器缓存吗。
  • 第二个问题:
    目前项目是使用webpack在index.html内通过CDN加载静态资源,所以想在子应用复用主应用的资源,同时在子应用加载时拼接上主应用传递的时间戳,

遇到的问题是:子应用加载CDN前需要拿到主应用传递的时间戳并拼接,在这之前webpack做了一个externals的排包动作,但是在这个时间是没有完成CDN加载的,会找不到需要排的这个包。

不考虑子应用复用的情况,主应用使用globalAssets方法,globalAssets触发的CDN资源没有加载之前,webpack如果配置externals,也会有一样的问题

请问有方案可以实现globalAssets在webpack排包之前加载吗

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

1 participant