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?

Upvotes: 1

Views: 1648

Answers (1)

Raphael Rafatpanah
Raphael Rafatpanah

Reputation: 19967

You can use Copy Webpack Plugin for this use case.

Upvotes: 1

Related Questions