qiankun icon indicating copy to clipboard operation
qiankun copied to clipboard

changes not applies on page with hmr when use https shell deployed on remote server and override an subapp running on http localhost

Open Relaxe111 opened this issue 3 years ago • 3 comments
trafficstars

When i access shell application deployed on cloud through https and override an subapp from localhost hot updates are seen in the console but in browser changes not applied on the page. what's interesting errors are shown and full reloads applies as well:

Peek 2022-07-31 20-37

My stack is react 18, vite 3, for both shell and subbapps. What could be the problem? Thank You in advance).

Relaxe111 avatar Aug 01 '22 08:08 Relaxe111

https://github.com/umijs/qiankun/issues/2150

gongshun avatar Aug 03 '22 07:08 gongshun

I might be wrong but, I think my situation is slightly different from #2150 because I have no errors. All the data is coming in the browser, I can see file with changes but they not applies. But full reloads and errors shows properly

Relaxe111 avatar Aug 03 '22 07:08 Relaxe111

I figure out that in my case (I use vite on all sub apps and shell), problem is related ti react-refresh plugin. In production he is not present. and only full reloads are working. i presume that this is somehow related to the fact that react refresh works with relative paths and nothing happens because he is considering only relative paths. In any case i still can't understand that new file is coming in app shell and new changes i can see in freshly rendered file.

Relaxe111 avatar Aug 16 '22 16:08 Relaxe111

Similar problem. but when I enable react dev tools, changes will be applied to the page. I find that webpack hot update is triggered, but react refresh fails, because it doesn't get the mounted roots. Maybe there is something wrong with multi roots react-refresh

JackClown avatar Oct 08 '22 08:10 JackClown