Open hopperd opened 1 month ago
I think maybe you can get files you want through http request when starting with devServer? It doesn't seem like a common solution.
Do you mean this doesn't feel like something that is valuable to add to this plugin or the solution of doing during the devServer starting phase doesn't seem common?
yeah, it sounds like vite build --watch
Ah ok, that does appear to write the files out, but doesn't appear to listen on any port for some reason so HMR still isn't working.
I kind of got it working using concurrently "vite" "vite build --watch"
. Thanks for pointing me in the right direction and great job on the plugin
Unfortunately this doesn't actual let HMR work. One has to still reload the entire page for this to work correctly which isn't as ideal as HMR. Basically looking for similar support for https://github.com/vitejs/vite/discussions/6108.
I would like to have the HTML file written out even when devServer is running similar to a production build.
The use case is that I'm using a Java/Spring application that looks for these files to render them as Thymeleaf templates. This works perfect with a production build, but since the dev builds don't write the file the templates are not found.