Skip to content

Commit

Permalink
chore: static and dynamic routes already filtered
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Mar 25, 2024
1 parent 48a2ed6 commit 5795d63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/pwa-simple-sw/app/shared-sw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export function setupRoutes() {
// disable precaching in dev
if (import.meta.env.PROD) {
const baseUrl = import.meta.env.BASE_URL
const useStaticRoutes = staticRoutes.filter(r => r.path && !r.path.includes(':')).reduce((acc, r) => {
const useStaticRoutes = staticRoutes.reduce((acc, r) => {
acc.push(`(${r.path!})`)
return acc
}, [] as string[])
const useDynamicRoutes = dynamicRoutes.filter(r => r.path && r.path.includes(':')).reduce((acc, r) => {
const useDynamicRoutes = dynamicRoutes.reduce((acc, r) => {
acc.push(r.path!)
return acc
}, [] as string[])
Expand Down

0 comments on commit 5795d63

Please sign in to comment.