This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added spaces between section in live code snippets
- Loading branch information
1 parent
d2ce62e
commit ca3ab06
Showing
2 changed files
with
10 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1 @@ | ||
importScripts('https://cdn.jsdelivr.net/npm/workbox-cdn@4.3.1/workbox/workbox-sw.js') | ||
|
||
// -------------------------------------------------- | ||
// Configure | ||
// -------------------------------------------------- | ||
|
||
// Set workbox config | ||
workbox.setConfig({ | ||
"debug": false | ||
}) | ||
|
||
// Start controlling any existing clients as soon as it activates | ||
workbox.core.clientsClaim() | ||
|
||
// Skip over the SW waiting lifecycle stage | ||
workbox.core.skipWaiting() | ||
|
||
workbox.precaching.cleanupOutdatedCaches() | ||
|
||
// -------------------------------------------------- | ||
// Precaches | ||
// -------------------------------------------------- | ||
|
||
// Precache assets | ||
|
||
// -------------------------------------------------- | ||
// Runtime Caching | ||
// -------------------------------------------------- | ||
|
||
// Register route handlers for runtimeCaching | ||
workbox.routing.registerRoute(new RegExp('/_nuxt/'), new workbox.strategies.CacheFirst ({}), 'GET') | ||
workbox.routing.registerRoute(new RegExp('/'), new workbox.strategies.NetworkFirst ({}), 'GET') | ||
// THIS FILE SHOULD NOT BE VERSION CONTROLLED |