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

Cache the polyfills in runtimeCaching #1066

Merged
merged 3 commits into from
Oct 2, 2017
Merged

Cache the polyfills in runtimeCaching #1066

merged 3 commits into from
Oct 2, 2017

Conversation

abdonrd
Copy link
Contributor

@abdonrd abdonrd commented Sep 29, 2017

As @frankiefu recommended here: Polymer/news#141 (comment)

Also, add images to staticFileGlobs.

@abdonrd
Copy link
Contributor Author

abdonrd commented Sep 29, 2017

About the index.html, should it be in staticFileGlobs or in navigateFallback? Or in both? Or in none?

  • Polymer/news: in none.
  • Polymer/shop: in staticFileGlobs.
  • PolymerElements/polymer-starter-kit: in staticFileGlobs & navigateFallback.

navigateFallback: 'index.html',
runtimeCaching: [
{
urlPattern: /bower_components\/webcomponentsjs\/.*.js/,
Copy link
Contributor

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/,

Copy link
Contributor Author

@abdonrd abdonrd Sep 30, 2017

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.

Copy link
Contributor

@jsilvermist jsilvermist Sep 30, 2017

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)

@keanulee keanulee merged commit 6bf448c into master Oct 2, 2017
@keanulee keanulee deleted the abdonrd-patch-1 branch October 2, 2017 18:08
@abdonrd abdonrd mentioned this pull request Oct 12, 2017
6 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants