Once the contents of /dist  have been deployed to a server, clients (typically browsers) will hit that server to grab the site and its assets. The last step can be time consuming, which is why browsers use a technique called caching. This allows sites to load faster with less unnecessary network traffic. However, it can also cause headaches when you need new code to be picked up.

source: https://webpack.js.org/guides/caching/

If we change the name of one file every time we modify its content we’ll be sure that the server use the correct version.

For this is useful use hashes. The idea is that when and only when we modify a file its name changes. These names uses hash functions.

More resources:

https://www.youtube.com/watch?v=qXRGKiHmtF8