Skip to content

Commit

Permalink
Enable navigation preload
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Sep 17, 2024
1 parent 2a80f87 commit 3e752c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"vite-plugin-run": "~0.5.2",
"workbox-cacheable-response": "~7.1.0",
"workbox-expiration": "~7.1.0",
"workbox-navigation-preload": "~7.1.0",
"workbox-routing": "~7.1.0",
"workbox-strategies": "~7.1.0"
},
Expand Down
3 changes: 3 additions & 0 deletions public/sw.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { CacheableResponsePlugin } from 'workbox-cacheable-response';
import { ExpirationPlugin } from 'workbox-expiration';
import * as navigationPreload from 'workbox-navigation-preload';
import { RegExpRoute, registerRoute, Route } from 'workbox-routing';
import {
CacheFirst,
NetworkFirst,
StaleWhileRevalidate,
} from 'workbox-strategies';

navigationPreload.enable();

self.__WB_DISABLE_DEV_LOGS = true;

const assetsRoute = new Route(
Expand Down

0 comments on commit 3e752c1

Please sign in to comment.