Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 6bf448c

Browse files
authored
Merge pull request #1066 from PolymerElements/abdonrd-patch-1
Cache the polyfills in runtimeCaching
2 parents b8d74a5 + 1a78872 commit 6bf448c

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

sw-precache-config.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,19 @@
1212

1313
module.exports = {
1414
staticFileGlobs: [
15-
'index.html',
15+
'bower_components/webcomponentsjs/webcomponents-loader.js',
16+
'images/*',
1617
'manifest.json',
17-
'bower_components/webcomponentsjs/*',
1818
],
19-
navigateFallback: 'index.html',
19+
runtimeCaching: [
20+
{
21+
urlPattern: /\/bower_components\/webcomponentsjs\/.*.js/,
22+
handler: 'fastest',
23+
options: {
24+
cache: {
25+
name: 'webcomponentsjs-polyfills-cache',
26+
},
27+
},
28+
},
29+
],
2030
};

0 commit comments

Comments
 (0)