Search code examples
phpwebpack-2file-watcher

Can webpack watch for changes in .php files?


Let's say I have a file structure like:

Directories

I'd like webpack command to watch for changes in the src/functions.php and implement them in the dist/functions.php. Basically all it needs to do is copy and paste if there are any changes.

Is this something webpack is able to do? Do I need any loaders or plugins for that?


Solution

  • You can use Copy Webpack Plugin for this use case.