I’ve set up an XP site with webpack bundling my client src (js and css) into assets. I fetch them with assetUrl.
The assetUrl function adds what seems like the build timestamp, meaning my users will have to reload these assets every time I deploy a new build. Perhaps not the end of the world, but nonetheless sub-optimal.
I know I could address the assets directly, bypassing the assetUrl method, but that would leave my users with old cached versions, which is even more problematic.
What I would like is to have a hash on the files. Webpack can generate this hash, but what would be the best way to tell my XP page controller (or html template) about the generated file name? I use webpack 4.
Alternatively, does XP have a hash mechanism I can use in conjunction with the assetUrl function?
How do others solve this?