PostHTML and HMR #1795
-
I successfully set up a PostHTML compile for the index.html page using In addition, I want to recompile the So does someone has an idea how to use PostHTML in all |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I could solve the issue with the help of a nice Discord community member. |
Beta Was this translation helpful? Give feedback.
I could solve the issue with the help of a nice Discord community member.
First, I've understand that
transformIndexHtml
is onlyindex.html
but it is in fact the file which is opened in the browser, so any html file.So, PostHTML also works in other html files.
In addition, I could set up HMR by implementing a plugin with the
handleHotUpdate
function.In this I checked the file type and used
server.ws.send({ type: "full-reload" });
to reload the current html file.