I have a couple of files in my /static directory that I'd like the serviceworker to pre-cache. I'm aware that I can just manually configure this (https://pwa.nuxtjs.org/workbox#precaching) but I'd like to dynamically populate the preCache array when I'm building the app.
Is this even possible?
I'd like the person who is going to use this to just be able to copy their images or files to this directory and then forget about them. I just want the images precached so when they're used on the page they're ready to go.
Second question: How would I even go about this? I'm thinking of iterating through the directory and assembling an array of filenames, but where exactly would I do this? I know there are hooks when building the app but how do I get my files to the pwa workbox module?