If my entire approach is wrong or can be alternatively improved, please advise. I don't really care about the means to the end, just that I can work in the way I desire.
I'm building a static web app which has multiple pages. During development I'm rapidly adding new pages, and this is causing me grief. I'm effectively doing this: https://dev.to/mariorodeghiero/multiple-html-files-with-htmlwebpackplugin-19bf which seems to be recommended by multiple people as the way to use HtmlWebpackPlugin for multiple files.
I don't have a static list, I'm using fs to glob all the *.htmls and build my plugin array for me.
That works great, but every time I add a new file I have to restart my dev toolchain in order to reconfigure webpack with the new file/plugin instance. This is inconvenient.
I know I can use fs.watch to reboot webpack/rerun the config for me when I detect a new file, but this stinks even more. Surely this can't be the way to do this?
How do I have a dev environment with webpack where I can add .html files and have the new files automatically detected by webpack and processed as normal.