mrsum / webpack-svgstore-plugin

Simple svg-sprite creating with webpack
https://www.npmjs.com/package/webpack-svgstore-plugin
200 stars 92 forks source link

hash based on content, not time #141

Closed Diokuz closed 5 years ago

Diokuz commented 7 years ago

Each time I launch webpack, it generates new svg sprite. It is bad because it changes bundle.js content, and that changes its hash, and that kills browser cache. So, each build kills cache, even if nothing changed.

How to make hash to be based on sprite content, not build time?

Diokuz commented 7 years ago

Looks like this commit in @artem-malko fork solves the problem https://github.com/artem-malko/webpack-svgstore-plugin/commit/94193ad5de750959d8c354ee5548198380fd8256 Do you plan to implement that in your repo?

There is even pr, closed for some reasons) https://github.com/mrsum/webpack-svgstore-plugin/pull/123

lgordey commented 6 years ago

@Diokuz The author closed it himself, so ¯\_(ツ)_/¯ But feel free to reopen/recreate pr ;)

artem-malko commented 6 years ago

Actually, I can't remember, why I closed it) I've made some critical fixes, which are not compatible with current version of plugin, cause I've solved just my own problem in my own way, sorry)