How does webpack package the previous traditional structure?

problem description

/css/demo1.html
/css/index.css
index.html
demo1.html
/js/index.js
/img/bg.jpg
/img/icon.jpg

as above, it is a traditional project structure, and because of the way you need to update the cache, you may need to configure hash, for each file to update the cache when webpack is packaged. But I am rather stupid, not very webpack, here to consult you.

the environmental background of the problems and what methods you have tried

I have written some basic configurations along with other articles, which are basically packaged according to the js entry, because I am not sure whether the structure of webpack is necessary or not.
my current project structure is very scattered, not a single-page application structure, so I have no idea about this structure.

what result do you expect?

add a variety of hash (update the cached version number) to the above structure to update the cache when there are changes to the image, css, js, and html.
may not be very clear, but the goal is to clear the cache and avoid manually adding the version number.

Jun.25,2021

if it's just the version number, why not let the back end give the variable a version number and add it to the introduction of the file that needs to be updated. If you need anything else to pack, you might as well webpack it. At least that's what I did before.

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-1b3b080-2c259.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-1b3b080-2c259.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?