How to export webpack to the project after packaging!

I"d like to know that when packaging with webpack, in order to prevent the cache that exists during browser access from affecting the test results, you can add a hash value (index.xxxxxxxxxxxxx.js) to the output file name. I would like to ask how to easily apply this kind of file to the project (such as the java project).

as far as I understand it, the whole process should be: after the front end is developed, the js file is packaged with webpack, and the packaged file is output to the corresponding resource file directory of the java project, while the html or jsp file of the java project already exists in the view directory of the project.
if only the html file is easy to do, the worst thing is to use the template to automatically generate the file and output it directly to a specific directory together with js. However, in the case of jsp, you can only reference the exported js file manually. But what about the hash value added to this file name? Do you also have to manually write the file name with the hash value every time?

Mar.17,2021

use HTMLWebpackPlugin, just to remove its default output, write a regular match, and inject the

you want using HTMLWebpackPlugin's hook
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e494b2-44d15.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e494b2-44d15.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?