Skip to content

Commit 2620ce1

Browse files
authored
Clean up the local workbox-sw guidance (google#9416)
1 parent f10e0ca commit 2620ce1

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/content/en/tools/workbox/modules/workbox-sw.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ book_path: /web/tools/workbox/_book.yaml
33
description: 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
5252
hosted on your own domain.
5353

5454
The 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

6463
workbox.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

7370
Under the hood, loading new modules for the first time involves calling

0 commit comments

Comments
 (0)