forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aio): cache external resources in the ServiceWorker
Cache resources that are necessary for displaying the basic pages when offline.
- Loading branch information
1 parent
a9027a2
commit 749bcf3
Showing
3 changed files
with
14 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
{ | ||
"external": { | ||
"urls": [ | ||
{"url": "https://fonts.googleapis.com/css?family=Droid+Sans+Mono"}, | ||
{"url": "https://fonts.gstatic.com/s/droidsansmono/v7/ns-m2xQYezAtqh7ai59hJYdJ2JT0J65PSe7wdxAnx_I.woff2"}, | ||
{"url": "https://fonts.googleapis.com/icon?family=Material+Icons"}, | ||
{"url": "https://fonts.gstatic.com/s/materialicons/v22/2fcrYFNaTjcS6g4U3t-Y5ZjZjT5FdEJ140U2DJYC3mY.woff2"}, | ||
{"url": "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"}, | ||
{"url": "https://unpkg.com/[email protected]/lunr.min.js"} | ||
] | ||
}, | ||
"static.ignore": [ | ||
"\\.js\\.map$", | ||
"^/assets/images/.*/unused/", | ||
|
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 |
---|---|---|
|
@@ -5,7 +5,8 @@ | |
|
||
var SEARCH_TERMS_URL = '/content/docs/app/search-data.json'; | ||
|
||
importScripts('https://unpkg.com/[email protected]'); | ||
// NOTE: This needs to be kept in sync with `ngsw-manifest.json`. | ||
importScripts('https://unpkg.com/[email protected]/lunr.min.js'); | ||
|
||
var index = createIndex(); | ||
var pages = {}; | ||
|
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