M
M
myaca2017-10-03 01:32:24
JavaScript
myaca, 2017-10-03 01:32:24

How to copy files on change via webpack?

Used Gulp before...
Can't figure out how it's done in webpack
I want webpack to track the changes and throw the changed files into the build folder when changing files in my src source folder.
How is this done in webpack? I can't quite understand...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrei Smirnov, 2017-10-03
@myaca

The CopyWebpackPlugin does the copying . As far as I know, webpack is not a program that constantly runs and monitors file changes. Simply put, WebPack always rebuilds everything.
If we talk about JavaScript, then there is HMR (hot module replacement) which replaces the changed modules on the client. Maybe this is what you need?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question