-
Notifications
You must be signed in to change notification settings - Fork 660
Cache the polyfills in runtimeCaching #1066
Conversation
6731b6b
to
b820a41
Compare
About the
|
sw-precache-config.js
Outdated
navigateFallback: 'index.html', | ||
runtimeCaching: [ | ||
{ | ||
urlPattern: /bower_components\/webcomponentsjs\/.*.js/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep the leading slash, so it doesn't match foobower_components/
.
urlPattern: /\/bower_components\/webcomponentsjs\/.*.js/,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe ^
would be better? (I'm not 100% sure it will work)
urlPattern: /^bower_components\/webcomponentsjs\/.*.js/,
To maintain consistency, since the entire project has relative paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abdonrd Wouldn't that break relative paths though since it would match /bower_components/
but not /subdirectory/bower_components/
?
Edit: Now that I think about it, if it's a path, wouldn't that example break everywhere since it should contain a /
at the beginning?
(Not exactly sure what this is being matched against)
As @frankiefu recommended here: Polymer/news#141 (comment)
Also, add images to
staticFileGlobs
.