umijs / qiankun

📦 🚀 Blazing fast, simple and complete solution for micro frontends.
https://qiankun.umijs.org
MIT License
15.71k stars 2k forks source link

create-react-app为主应用 子应用热更新无效 #2328

Open mrsy3249 opened 1 year ago

mrsy3249 commented 1 year ago

解决方案 webpack 插件重置热更新 new ReactRefreshWebpackPlugin({ overlay: false, library: “XXXXXX” //添加这个字段并设置唯一值。参考链接 })

library Default: '', or output.uniqueName in Webpack 5, or output.library for both Webpack 4/5 if set

Sets a namespace for the React Refresh runtime. This is similar to the output.uniqueName in Webpack 5 or the output.library option in Webpack 4/5.

It is most useful when multiple instances of React Refresh is running together simultaneously.

https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/docs/API.md

mrsy3249 commented 1 year ago

image