ElMassimo/vite-plugin-image-presets

Cached images are re-written (and not used from cache) on each netlify deployment

mseele opened this issue · 2 comments

When we deploy https://github.com/mseele/sve-website via netlify, the image are re-written each time and the image cache is ignored.
Please see the attached build log.

If there is anything I can do to help detecting the problem, please let me know.

Hi Michael!

You are using a custom cacheDir, which is not persisted by Netlify between builds.

The default value is inside node_modules, so it would be cached by default.

Check Netlify's documentation on how to cache additional directories.

@ElMassimo Thank you, I did not know this. I've moved it out from node_modules because is was only cached when there where no dependency changes. And as a workaround (to cache always) I thought i just need to export it into another folder.
My fault, I will add https://github.com/siakaramalegos/netlify-plugin-cache-folder to use a cached folder.