arthurbergmz / webpack-pwa-manifest

Progressive Web App Manifest Generator for Webpack, with auto icon resizing and fingerprinting support.
MIT License
513 stars 93 forks source link

Cache resized icons for faster builds #45

Open Cu3PO42 opened 6 years ago

Cu3PO42 commented 6 years ago

It would be great if the icons could be cached somewhere after resizing (maybe based on the last modified timestamp for the best performance) to get faster builds. Right now webpack-pwa-manifest adds ~8s to every build for me, which is a 25% increase.

I believe this is going to get more relevant when you implement #44 since the potential number of output files is going to grow by a fair margin in some configurations.

A good candidate for a cache path would be .cache/pwa-manifest I think, although ideally that would ideally be configurable as well.

And thank you for making such a useful piece of software of course :)

arthurbergmz commented 6 years ago

This plugin already caches files, but I'll figure out something faster for the next version.

Cu3PO42 commented 6 years ago

Sorry, I didn’t see that when I glanced at the code or find it in the documentation. Might I suggest adding that to the README?

arthurbergmz commented 6 years ago

Oh, I see your point now. The current caching is not what you've proposed. You are talking about local caching, right? This plugin only caches icons in the first Webpack run, in memory.

I'll look forward for local caching.

Cu3PO42 commented 6 years ago

Yes, I was talking about about caching on the local file system.