goldhand / sw-precache-webpack-plugin

Webpack plugin that generates a service worker using sw-precache that will cache webpack's bundles' emitted assets. You can optionally pass sw-precache configuration options to webpack through this plugin.
MIT License
1.44k stars 104 forks source link

Feature request. Add an option to GZIP service-worker.js file. #133

Open JustFly1984 opened 6 years ago

JustFly1984 commented 6 years ago

The issue I'm experiencing is pretty annoying. I'm trying to optimize my first byte, by turning off compression, and gziping everything by webpack with CompressionPlugin. The issue is that it doesn't compress service-worker.js produced by sw-precache-webpack-plugin.

I understand the reason why: service-worker.js should cache all chunks produced by webpack after CompressionPlugin compression.

This is why I think it should be an option in sw-precache-webpack-plugin itself.

Thank you)

nisargrthakkar commented 6 years ago

+1

njacob1001 commented 6 years ago

yes! +1

aralroca commented 6 years ago

Any new?

goldhand commented 6 years ago

Happy to take a PR for this :)

abhipanda commented 5 years ago

Is there a workaround ?