There seems to be an issue which is causing over pushing' with the currently generated push-manifest.json.
polymer buildIf you take a look in build/es6-unbundled/push-manifest.json, you'll see something like this:
{
"src/my-app.html": {
"bower_components/polymer/polymer-element.html": {
"type": "document",
"weight": 1
},
"bower_components/polymer/lib/mixins/element-mixin.html": {
"type": "document",
"weight": 1
},
...
},
"src/my-view1.html": {
"bower_components/polymer/polymer-element.html": {
"type": "document",
"weight": 1
},
"bower_components/polymer/lib/mixins/element-mixin.html": {
"type": "document",
"weight": 1
},
}
}
The way I understand it, the system should generate a push manifest for src/my-app.html and then generate an additional push manifests for the fragments (src/my-view1.html).
The dependency tree _always_ is as follows:
index.html > src/my-app.html > (dynamic) src/my-view1.html.
This means that by the time the browser loads src/my-view1.html, all dependencies that are required by src/my-app.html are already there. In this case the server will push all dependencies defined by src/my-view1.html.
The result in this case would be that there would be _no_ push dependencies in the manifest as they are _all_ already pushed in src/my-app.html.
I've seen some of the same things but I don't think it's something the build can fix, it seems more of a serving strategy issue so I've added this: https://github.com/Polymer/prpl-server-node/issues/41
Moving to Polymer/prpl-server-node#41
Reopening this issue because the fix to Polymer/prpl-server-node#41 only addressed the cache headers, not the duplication of assets between shell and fragments (e.g. polymer-element.html).
cc @aomarks @FredKSchott
@aomarks any news on this? 馃檪
Right now I'm trying with the scripts that the shop has: https://github.com/Polymer/shop/pull/145
The prpl-server setup commit: https://github.com/abdonrd/abdonrd.com/commit/40628a32e71626811d1179615a2f457a5d35fd4c
The scripts commit: https://github.com/abdonrd/abdonrd.com/commit/a7d503b42dc2596871a2044af9cac20ec170782dAll: https://github.com/abdonrd/abdonrd.com/compare/feature/new_design...feature/new-design-prpl-server
We've talked about a way to describe "temporal" dependencies between fragments - that we know that some fragments are always loaded before others and therefore we don't want to push shared dependencies of the two for the later fragment.
Doing that would require some format to describe the dependencies (if we don't infer from analysis). One thing we can already assume though is that the entrypoint and shell always load before other fragments, so anything pushed with them can be excluded from other fragments.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Reopening this issue because the fix to Polymer/prpl-server-node#41 only addressed the cache headers, not the duplication of assets between shell and fragments (e.g.
polymer-element.html).cc @aomarks @FredKSchott