Closed hirasso closed 2 years ago
@hirasso Would something like this work? https://github.com/pigcan/extra-watch-webpack-plugin It appears to add files to Webpack's file tracking. Assuming it works, changes to those files should be passed into this plugin as well.
@statianzo extra-watch-webpack-plugin can indeed watch my php files and re-compile if I save them, but it doesn't trigger your livereload script to reload my browser.
Hi there! I am using this plugin in a classic server-side rendered environment based on
php
. Having the browser reload when I edit myjs
andscss
files is great, but the gold standard for me is to also have the browser reload if I change myphp
files.I was able to hack something together that makes this possible through
webpack-livereload-plugin
. Following are the relevant partsin mywebpack.config.js
:So as you can see, I am starting a chokidar watcher and when I change any of my
php
files, I send a request through webpack-livereload-plugin to tiny-lr to reload the page.I can imagine many other people like me would enjoy this kind of functionality. Maybe it could become a part of this plugin? As an additional option, for example
watchAdditionalFiles
or the like?