icestark icon indicating copy to clipboard operation
icestark copied to clipboard

:tiger: Micro Frontends solution for large application(面向大型应用的微前端解决方案),站点国内镜像:https://icestark.gitee.io

Results 159 icestark issues
Sort by recently updated
recently updated
newest added

sub vue2 import Vue from 'vue'; import { isInIcestark, setLibraryName } from '@ice/stark-app'; import App from './App.vue'; import router from './router'; // Vue.use(ElementUI); Vue.config.productionTip = false; let vue = null;...

主应用使用icestark给的React主应用,子应用使用icestark官方案例vite+vue应用,子应用切换路由,有时候会执行子应用的unmount,然后再重新mount,这时候再点击浏览器的返回按钮,会出现undefined路由 例如这样的错误路径:http://localhost:3333/waiterundefined waiter是子应用的path

Bumps [axios](https://github.com/axios/axios) from 0.21.2 to 1.6.8. Release notes Sourced from axios's releases. Release v1.6.8 Release notes: Bug Fixes AxiosHeaders: fix AxiosHeaders conversion to an object during config merging (#6243) (2656612)...

dependencies

当我有个已经存在的vue的应用,在将这个vue应用作为微应用时, 1、[已有 Vue 项目改造为微应用](https://micro-frontends.ice.work/docs/guide/use-child/vue#%E5%B7%B2%E6%9C%89-vue-%E9%A1%B9%E7%9B%AE%E6%94%B9%E9%80%A0%E4%B8%BA%E5%BE%AE%E5%BA%94%E7%94%A8) 在该处文档中,没有提及需要安装的包名,以及该应用是否是其他框架 2、[其他框架接入微应用](https://micro-frontends.ice.work/docs/guide/use-child/others) 在该处文档的Vite 应用文档处,没有提及需要安装的包名

现象:配置 approuter prefetch 后,实际未预加载微应用 router 相关资源 原因定位:AppRouter 内部在 construct 时,解析 React.children,进行微应用的 prefetch,这要求在 AppRouter 在构建时就需要提供所有微应用的 child。 修复方式:修改 @ice/plugin-icestark 插件中,对 AppRouter 的渲染方式,传入 apps,在 AppRouter 中,判定 apps 变化,做 prefetch。 --- 构造方法时 prefetch https://github.com/ice-lab/icestark/blob/master/packages/icestark/src/AppRouter.tsx#L79...

有暴露的方法可以停止 icestark 的运行吗?

![image](https://github.com/ice-lab/icestark/assets/24268244/12bfce12-91a5-482c-9529-b4a0e7a3db64) 子应用配置: app.ts ![image](https://github.com/ice-lab/icestark/assets/24268244/f46e99ba-58df-4c50-821d-86aae9d9a0e6) config ![image](https://github.com/ice-lab/icestark/assets/24268244/98435a42-ff13-4183-9650-2c88d24fdd82) 主应用配置: ![image](https://github.com/ice-lab/icestark/assets/24268244/96370860-4e56-4eaa-81f7-931eacac950f) 如何实现主程序访问子路由进行匹配 现在情况 可以获取到子应用但是无法进入子应用路由

# 修复微模块的 targetNode 为 null 的问题 现象:微模块的 mount API 无法获取 targetNode 原因定位:通过日志方式呈现,最终定位原因为 **setState 后的执行时序问题** ![image](https://github.com/ice-lab/icestark/assets/13255714/b7edcd65-dc8d-41e4-99fa-eaf26a9df502) ![image](https://github.com/ice-lab/icestark/assets/13255714/510306e1-ec95-46a3-b7ff-5a353b340477) 最终执行时序 ![image](https://github.com/ice-lab/icestark/assets/13255714/33c4fe4a-e9b4-4340-854c-41eec445556a) 修复方式:通过将后续的 mount 逻辑放到 setState 回调,保证此时 this.mountNode 是成功赋值的状态 ![image](https://github.com/ice-lab/icestark/assets/13255714/d295fd08-4855-4bb3-8bf0-5d653b1ed9ea) 最终执行时序正常,问题修复 ![image](https://github.com/ice-lab/icestark/assets/13255714/8c1aa55e-3030-452f-98a6-f16104c21d8e)

1:老旧项目vue2改造成基座。切页面或者刷新就找不到路由 ![image](https://github.com/ice-lab/icestark/assets/34369109/da9c7718-7aa9-4f02-98e9-a941817c8edd) 路由一刷新。就显示Cannot GET /home(路由) 2: 改造的主子应用 用isInIcestark() 没办法判断是否在环境内 ![image](https://github.com/ice-lab/icestark/assets/34369109/f02c86cb-d7fc-4327-9411-fdd634ea14bf)

如下图,这张图片资源再单独运行微应用可以相应,但是主应用和微应用一起运行时,无法获取到正确的静态资源 ![image](https://github.com/ice-lab/icestark/assets/55862169/41b8c8d7-b77a-4b09-8622-a3a206888d0b)