I have been struggling for over two days to come up with the perfect setup for webpack
when using express
and EJS
.
This is where I am at at the moment:
https://github.com/ZeldOcarina/webpack-express-ejs-setup
Right now I have HMR enabled for SCSS and front-end JS changes.
The last thing I need to add is live reload on views/ejs changes. It works if I change liveReload
to true
on webpack.dev.js
but then HMR
breaks as everything reloads.
I can't find a way to reload only for EJS
file changes.
Does anyone have any suggestions?
Thank you!