zhxx
zhxx
@mattdistefano You are right, after importing polyfills.ts in main.ts, it works. Thanks
My fault, this is not an issue.
遇到了相同的问题,看了下,是因为document.head.appendChild被改写了,导致vue-style-loader没有把样式加到正确的节点上。@kuitos 有什么建议吗?
vue-router在路由变化之前加载资源,加载完毕再跳转。因为路由没有变化,qiankun判断微应用还是activated状态,用newAppendChild加载css。 ` const activated = checkActivityFunctions(window.location).some(name => name === appName); // only hijack dynamic style injection when app activated if (activated) { dynamicStyleSheetElements.push(stylesheetElement); return rawAppendChild.call(appWrapperGetter(), stylesheetElement) as T; }` 我觉得是不是可以加一个手动卸载微应用的方法?@Deturium
目前解决这个问题的临时方案如下: 在main.js里保存一份appendChild,然后在vue-router的钩子函数beforeEach里判断to.path是不是微应用,如果不是,就把HTMLHeadElement.prototype.appendChild改回来
朋友,你这样父子项目耦合度太高了,不建议这样做。