fix(pwa): 🐛 path precaching of pages (/routes/*/index.tsx)
This commit is contained in:
parent
32732be3b5
commit
f7a0e2c77f
|
|
@ -24,7 +24,8 @@ export const handler: SessionHandlers = {
|
||||||
for await (const route of expandGlob(routes, { root: '.' })) {
|
for await (const route of expandGlob(routes, { root: '.' })) {
|
||||||
if (!route.isFile) continue
|
if (!route.isFile) continue
|
||||||
//@ts-expect-error parentPath is missing from type definition
|
//@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
|
// Pre-cache files
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue