TrySound / rollup-plugin-terser

Rollup plugin to minify generated bundle
MIT License
609 stars 55 forks source link

Feature request: Augment chunk hash #45

Open arggh opened 4 years ago

arggh commented 4 years ago

Rollup now has an augmentChunkHash hook for plugins, read more →

The idea is, rollup-plugin-terser could augment the hashes when it's being used, or even when it's own settings change and affect the output of those chunks.

This would prevent scenarios like the one I had tonight, where my chunks' hashes were not changing even though I was experimenting with Rollup's config, enabling and disabling rollup-plugin-terser and some of it's settings, and thus also affecting the output content.

This behavior combined with those chunks being served with some pretty long lasting caching headers and... it took me a while to figure out why things weren't working as expected.

TrySound commented 4 years ago

Hi @arggh Would you like to send a PR?