Open erdong0604 opened 2 years ago
Happens to me too, any update?
No.
I have this same issue. HMR doesn't work when using the module federation plugin. If I comment out the plugin in my vue.config.js
file, then HMR works as expected.
it should be able to resolve your problem. you can try it. https://www.npmjs.com/package/@module-federation/fmr
I think this is happening because the remoteEntry.js
file is auto-injected into the html page. I tried to use html-webpack-skip-assets-plugin
to remove it, but it didn't work for some reason. The remoteEntry.js
file still ends up in the index.html
file.
I think this is happening because the
remoteEntry.js
file is auto-injected into the html page. I tried to usehtml-webpack-skip-assets-plugin
to remove it, but it didn't work for some reason. TheremoteEntry.js
file still ends up in theindex.html
file.
I fixed this by just specifying what chunks to be injected in the webpack config (HtmlWebpackPlugin chunks option). In my case I just render the 'app' chunk and that omits remoteEntry.js injection in the html page.
Version
5.0.0-rc.1
Reproduction link
github.com
Environment info
Steps to reproduce
When I modify the HTML content and save it, the console reports the following error.
What is expected?
The browser changes when HTML content is modified and saved
What is actually happening?
When the HTML content is modified and saved, the browser does not change, and an error is reported on the console