File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed
cra-template-typescript/template/src
cra-template/template/src Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ /* eslint-disable no-restricted-globals */
2+
3+ self . addEventListener ( "message" , event => {
4+ if ( event . data && event . data . type === "SKIP_WAITING" ) {
5+ self . skipWaiting ( ) ;
6+ }
7+ } ) ;
8+
9+ // eslint-disable-next-line no-undef
10+ workbox . core . clientsClaim ( ) ;
11+
12+ /**
13+ * The workboxSW.precacheAndRoute() method efficiently caches and responds to
14+ * requests for URLs in the manifest.
15+ * See https://goo.gl/S9QRab
16+ */
17+ self . __precacheManifest = [ ] . concat ( self . __precacheManifest || [ ] ) ;
18+ // eslint-disable-next-line no-undef
19+ workbox . precaching . precacheAndRoute ( self . __precacheManifest , { } ) ;
20+
21+ // eslint-disable-next-line no-undef
22+ workbox . routing . registerNavigationRoute (
23+ // eslint-disable-next-line no-undef
24+ workbox . precaching . getCacheKeyForURL ( "/index.html" ) ,
25+ {
26+ blacklist : [ / ^ \/ _ / , / \/ [ ^ / ? ] + \. [ ^ / ] + $ / ]
27+ }
28+ ) ;
Original file line number Diff line number Diff line change 1+ /* eslint-disable no-restricted-globals */
2+
3+ self . addEventListener ( "message" , event => {
4+ if ( event . data && event . data . type === "SKIP_WAITING" ) {
5+ self . skipWaiting ( ) ;
6+ }
7+ } ) ;
8+
9+ // eslint-disable-next-line no-undef
10+ workbox . core . clientsClaim ( ) ;
11+
12+ /**
13+ * The workboxSW.precacheAndRoute() method efficiently caches and responds to
14+ * requests for URLs in the manifest.
15+ * See https://goo.gl/S9QRab
16+ */
17+ self . __precacheManifest = [ ] . concat ( self . __precacheManifest || [ ] ) ;
18+ // eslint-disable-next-line no-undef
19+ workbox . precaching . precacheAndRoute ( self . __precacheManifest , { } ) ;
20+
21+ // eslint-disable-next-line no-undef
22+ workbox . routing . registerNavigationRoute (
23+ // eslint-disable-next-line no-undef
24+ workbox . precaching . getCacheKeyForURL ( "/index.html" ) ,
25+ {
26+ blacklist : [ / ^ \/ _ / , / \/ [ ^ / ? ] + \. [ ^ / ] + $ / ]
27+ }
28+ ) ;
You can’t perform that action at this time.
0 commit comments