GoogleChromeLabs / sw-precache

[Deprecated] A node module to generate service worker code that will precache specific resources so they work offline.
https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
Apache License 2.0
5.23k stars 389 forks source link

sw-precache don't work with css #360

Open irpena opened 6 years ago

irpena commented 6 years ago

Hi

The Gulp script is working correctly for me, except for a main.css file.

The project is generated with IONIC 3

sw-precache --root=www --static-file-globs='www/build/main.css' Skipping static resource "www/build/main.css" (2.3 MB) - max size is 2.1 MB Total precache size is about 0 B for 0 resources. www/service-worker.js has been generated with the service worker contents.

Thanks

bobbylej commented 5 years ago

I'm not sure if I properly understand @irpena, sw-precache is skipping your main.css file because it's too big and that's your problem? If I'm right, then you can change max size for files by maximumFileSizeToCacheInBytes param (in console probably it's maximum-file-size-to-cache-in-bytes).