The Wayback Machine - https://web.archive.org/web/20210804204620/https://github.com/topics/micro-frontend
Skip to content
#

micro-frontend

Here are 106 public repositories matching this topic...

dengBox
dengBox commented Aug 6, 2020

Background

目前使用qiankun2.x的版本,业务提出需求在发布新的版本时候,期望可以不刷新页面(主应用暂时不考虑)进行该系统的热重载。类似于pc端的热更新,期望qiankun可以导出unload方法,完全销毁app的生命周期,业务系统再次将其重载。

Proposal

  1. 翻看源码发现不能热更新的原因是因为import-html-entry中缓存了 embedHTMLCache
  2. qiankunimportEntry时,如果已经获取过html资源,每次获取的都是内存中的html,以至于script & style也是缓存的
  3. 我的解决方案是,在import-html-entry中导出根据app去清除缓存的钩子函数
  4. 在qiankun中包裹其方法,根据single-spa的appStatus进行卸载应用

Improve this page

Add a description, image, and links to the micro-frontend topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the micro-frontend topic, visit your repo's landing page and select "manage topics."

Learn more