Skip to content

Commit

Permalink
Don't need to specify specific fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
keanulee committed Apr 6, 2018
1 parent 73b982c commit 91dd839
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 35 deletions.
8 changes: 0 additions & 8 deletions polymer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
{
"entrypoint": "index.html",
"shell": "src/shop-app.js",
"fragments": [
"src/shop-list.js",
"src/shop-detail.js",
"src/shop-cart.js",
"src/shop-checkout.js",
"src/lazy-resources.js"
],
"sources": [
"src/**/*",
"data/**/*",
"images/**/*"
],
Expand Down
33 changes: 6 additions & 27 deletions sw-precache-config.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,17 @@
module.exports = {
staticFileGlobs: [
'manifest.json',
'node_modules/webcomponentsjs/webcomponents-loader.js',
'images/*'
'images/*',
'src/**/*',
],
runtimeCaching: [
{
urlPattern: /\/node_modules\/webcomponentsjs\/.*.js/,
handler: 'fastest',
options: {
cache: {
name: 'webcomponentsjs-polyfills-cache'
}
}
urlPattern: /\/@webcomponents\/webcomponentsjs\//,
handler: 'fastest'
},
{
urlPattern: /\/data\/images\/.*/,
handler: 'cacheFirst',
options: {
cache: {
maxEntries: 200,
name: 'items-cache'
}
}
},
{
urlPattern: /\/data\/.*json/,
handler: 'fastest',
options: {
cache: {
maxEntries: 100,
name: 'data-cache'
}
}
urlPattern: /\/data\//,
handler: 'fastest'
}
]
};

0 comments on commit 91dd839

Please sign in to comment.