I currently have a Gulp setup that runs Hugo, followed by Webpack for TypeScript support. The stylesheet is handled by Hugo. The problem I’m facing is that I can’t think of an easy way to import the generated stylesheet into my serviceworker.js for caching, due to it being fingerprinted and having a hash in its name.
My first thought was to use node to generate a .json by reading from the dist folder and looking for the last modified stylesheet. This .json file could be then imported into my serviceworker.js, allowing me to cache the file.
I noticed that there is a .json file inside of the resources/_gen/ directory, containing the name, that could perhaps be of help, but I’m not sure whether this is meant to be private?
Any ideas on how to tackle this, perhaps in a more idiomatic way to Hugo?