* Add a `fetch` listener to the service worker that will * respond to * [network requests]https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests * with precached assets. * * Requests for assets that aren't precached, the `F
(options?: PrecacheRouteOptions)
| 29 | * @memberof workbox-precaching |
| 30 | */ |
| 31 | function addRoute(options?: PrecacheRouteOptions): void { |
| 32 | const precacheController = getOrCreatePrecacheController(); |
| 33 | |
| 34 | const precacheRoute = new PrecacheRoute(precacheController, options); |
| 35 | registerRoute(precacheRoute); |
| 36 | } |
| 37 | |
| 38 | export {addRoute}; |
no test coverage detected