polymer-dart icon indicating copy to clipboard operation
polymer-dart copied to clipboard

improve tracking of URIs on polymer build

Open DartBot opened this issue 9 years ago • 11 comments

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="96" height="96"hspace="10"> Issue by sigmundch Originally opened as dart-lang/sdk#14186


Our polymer-build set inlines script tags and polymer element declarations onto the main page. In the process we rewrite URIs to normalize for the fact that the baseUri of the imported document is different than the main document.

This works for static URIs, but not for URIs produced from bindings. For those we might have to do something more.

Consider looking more into vulcanize and see if we agree on the design choices there, also see how deal with assetpath:

https://github.com/Polymer/labs/blob/37d8a25643c31b7f9acd2525208b0686a4933887/vulcanize/lib/vulcan.js#L50

DartBot avatar Jun 05 '15 23:06 DartBot

<img src="https://avatars.githubusercontent.com/u/1081711?v=3" align="left" width="48" height="48"hspace="10"> Comment by jmesserly


Removed Pkg-Polymer label. Added Pkg-PolymerBuild label.

DartBot avatar Jun 05 '15 23:06 DartBot

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed Polymer-P-2 label. Added Polymer-Milestone-Later label.

DartBot avatar Jun 05 '15 23:06 DartBot

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed Polymer-Milestone-Later label. Added PolymerMilestone-Later label.

DartBot avatar Jun 05 '15 23:06 DartBot

<img src="https://avatars.githubusercontent.com/u/984921?v=3" align="left" width="48" height="48"hspace="10"> Comment by jakemac53


Ping on this, I stumbled across the assetpath attribute when looking at vulcanizer, and I think it is a reasonable solution to dynamic paths, plus it would bring us more in sync with the polymer js side of things. Currently we are broken here because we are not adding the assetpath attribute to our inlined elements, yet at the same time we have ported the resolvePath method which implies that we would have support for this?

I think this would be a relatively minor change with moderate benefit, and its worth investing a day or so in. At least it provides some sort of story for dynamic relative paths.

DartBot avatar Jun 05 '15 23:06 DartBot