0

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.

ge022
  • 134
  • 1
  • 7

1 Answers1

0

This is a normal behaviour if you do a fresh build.

AFAIK, there are two ways to accomplish incremental updates:

  1. Use webpack's dev-server
  2. Start webpack in watch mode --> webpack --watch --info-verbosity verbose

With dev-server youre page will automatically refresh, when changes occur.

With watch mode you have to refresh the page manually to see the code changes

Legends
  • 21,202
  • 16
  • 97
  • 123