diff --git a/README.md b/README.md index d348a40..dfde64d 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ The integration accepts path to your own authored [service worker](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) and automatically injects dynamic variables such as `__assets` generated by Astro for caching. The goal is to let devs retain the flexibility for various [caching strategies](https://developer.chrome.com/docs/workbox/caching-strategies-overview/). +Other integrations exist which will generate a service worker for you, but [there are good reasons](https://developer.chrome.com/docs/workbox/modules/workbox-build#when_not_to_use_generatesw) to avoid this. + ## Installation In your [Astro](https://astro.build) project: @@ -50,3 +52,7 @@ The integration accepts a configuration object of type `ServiceWorkerConfig` wit ## Example sw.js You can find an example service worker (`example_sw.js`) in the [repository](https://ayco.io/gh/astro-sw), and here's the [raw file](https://raw.githubusercontent.com/ayoayco/astro-sw/main/example_sw.js) too. + +## Example project + +This was developed to support the needs of [Cozy](https://github.com/ayoayco/cozy). \ No newline at end of file diff --git a/index.js b/index.js index e004fd3..f9fde0e 100644 --- a/index.js +++ b/index.js @@ -9,7 +9,7 @@ import { randomUUID } from "node:crypto"; * assetCachePrefix?: string, * assetCacheVersionID?: string, * customRoutes?: Array, - * excludeRoutes?: Array