0👍
A hash is added to a file so it is later easier to distribute your code to public.
Imagine you created your app and you want to make use of it as straightforward as possible, including download time for users with slow connection. In the same time you want to be able to update your application on the server and make sure all users always see new version of your app. A way to go is file caching in users’ browsers but this causes lots of problems, nowever….
If you add hash to filename a webbrowser can cash it infinitely and if you update your code, you generate new file with new hash.
With this approach, when index.js
gets downloaded you’ll have different references there so webbrowser will download missing files, otherwise will use those from its cache