I'm using webpack for WordPress theme development. It works like a charm including BrowserSync for reloading the browser. BrowserSync watches all files including php files, so that works great.
In the next step I'd like to automate ftp upload. I've established this via vinyl-ftp and hooking into the compile.done hook of webpack.
The automated ftp upload works great for all files that cares webpack about (js, scss, images, fonts, svgs).
Now what comes in question is: how to care about changes in php files?
I don't want to hook into BrowserSync, because there are projects, that don't need BrowserSync, but automated ftp upload.
Is there any way to tell webpack to only watch php files and trigger the build on php file change? Then the compile.done hook would fire...
Or is there any other performant way to do this?