So I’ve been told by the project manager of this project I’m volunteering for that keeping names for files like index-xxxx.js will help to force the cache to clear if we use them in like the root index.html file inside a function in a script tag. I’ve also been told to copy the contents of these files and save it as a file with a consistent name. When I got told this I was like why would copying the contents of generated files help at all?
For reference the project is using Vite and React. I know vite generates a dist folder with a bunch of assets and the index-xxxx.js file is one of these assets. I am fairly certain that trying to use these files in the root index.html file will not work because every time the project gets built the files will change names and then break the build. So is there something I’m missing here?
Also any resources that explicitly states that generated files that should not be used outside of the dist folder would be greatly appreciated. I need to be 100% certain about these generated files.
file structure I hope this helps.
Project_folder
dist
assets
index-xxxx.js
index-xxxx.css
index.html
src
index.html