Closed fregante closed 2 years ago
It'd be great to have more documentation around HMR, if really possible, because the rest of the resources I found just gave up on webpack HMR with the exception of a Vue repository. Others are severely outdated (webpack 2) and/or use a lot of glue code to make it work.
Is HMR possible in a web extension? In which contexts? I'm looking to add it to a React extension.
Hmm Sorry for the problem you've encountered. I'm not using this mini-css-extract-plugin
(I'm using CSS-in-JS) and it seems like this plugin is executing the code for Web Extension inside the Node. I don't know why it is going to do this.
I'll look and configure a React HMR example maybe next week.
@fregante hi I have added a React extension HMR example.
Thank you, that helped get a bit further! Unfortunately I'm still seeing that strange error, I opened a demo PR for that
I'm trying to ad HMR to my extension but
webpack serve
appears to run this code (on css files 🤔) and fail:So I wanted to test it out using the examples linked in the readme but everything is missing, all the dependencies and the linked files. Could you include them all to ensure they can be run as-is?