diff --git a/routes/api/serviceworker/precache.tsx b/routes/api/serviceworker/precache.tsx index bd9425e..9b53d5a 100644 --- a/routes/api/serviceworker/precache.tsx +++ b/routes/api/serviceworker/precache.tsx @@ -24,7 +24,8 @@ export const handler: SessionHandlers = { for await (const route of expandGlob(routes, { root: '.' })) { if (!route.isFile) continue //@ts-expect-error parentPath is missing from type definition - preCachedUrls.push(strip(routes, route.parentPath)) + const path = route.parentPath as string + preCachedUrls.push(path.replace('routes', '').replace('\\', '/')) } // Pre-cache files