English
registerRoute
Function @vite-pwa/workbox-swkit/routingts
registerRoute(capture: string | RegExp | RouteMatchCallback | Route, handler?: RouteHandler, method?: HTTPMethod): RouteEasily register a RegExp, string, or function with a caching strategy to a singleton Router instance.
This method will generate a Route for you if needed and call workbox-routing.Router#registerRoute.
Parameters
capture– If the capture param is aRoute, all other arguments will be ignored.handler– A callback function that returns a Promise resulting in a Response. This parameter is required ifcaptureis not aRouteobject.method– The HTTP method to match the Route against.
Returns: The generated Route.