@@ -3,7 +3,7 @@ book_path: /web/tools/workbox/_book.yaml
33description: The module guide for workbox-sw.
44
55{# wf_blink_components: N/A #}
6- {# wf_updated_on: 2020-05-01 #}
6+ {# wf_updated_on: 2021-08-23 #}
77{# wf_published_on: 2017-11-27 #}
88
99# Workbox {: .page-title }
@@ -52,22 +52,19 @@ If you don’t want to use the CDN, it’s easy enough to switch to Workbox file
5252hosted on your own domain.
5353
5454The simplest approach is to get the files via [ ` workbox-cli ` 's ` copyLibraries `
55- command] ( /web/tools/workbox/modules/workbox-cli#copylibraries ) or from a [ GitHub
56- Release] ( https://github.com/GoogleChrome/workbox/releases ) , and then tell
55+ command] ( /web/tools/workbox/modules/workbox-cli#copylibraries ) , and then tell
5756` workbox-sw ` where to find these files via the ` modulePathPrefix ` config option.
5857
59- If you put the files under ` /third_party/workbox/ ` , you would use them like so:
58+ If you put the files under ` /third_party/workbox-vX.Y.Z / ` , you would use them like so:
6059
6160<pre class =" prettyprint js " >
62- importScripts('/third_party/workbox/workbox-sw.js');
61+ importScripts('/third_party/workbox-vX.Y.Z /workbox-sw.js');
6362
6463workbox.setConfig({
65- modulePathPrefix: '/third_party/workbox/'
64+ modulePathPrefix: '/third_party/workbox-vX.Y.Z /'
6665});
6766</pre >
6867
69- With this, you’ll use only the local Workbox files.
70-
7168## Avoid Async Imports
7269
7370Under the hood, loading new modules for the first time involves calling
0 commit comments