I am using splitChunks to optimize my app, but after one chunk updates, the browser pulls down all assets because clean-webpack-plugin removes the entire dist folder, changing the requested If-Modified-Since. Is there any way to clean up just the previous version of the changed chunk?
Thanks.
This is a normal behaviour if you do a fresh build.
AFAIK, there are two ways to accomplish incremental updates:
webpack --watch --info-verbosity verboseWith
dev-serveryoure page will automatically refresh, when changes occur.With
watch modeyou have to refresh the page manually to see the code changes