These are chat archives for webjars/webjars

1st
Nov 2017
Giovanni Lovato
@heruan
Nov 01 2017 18:02
How can I use Webjars with Polymer web components? I mean, in Polymer I have HTML files which import other files assuming its parent directory contains its dependencies: e.g. <link rel="import" href="../polymer/polymer-element.html"> but Webjars put the version as an additional directory, so that if I have /webjars/my-component/1.0.0/my-component.html which import ../polymer/polymer-element.html it won't find it since ../ would be /webjars/my-component and not /webjars.
Is there a workaround for this? Are there example of using Webjars with Polymer web components?
James Ward
@jamesward
Nov 01 2017 18:02
Yeah, unfortunately it is a pain. I really hate how Polymer assumes a cross-component dir structure.
I'm not sure if anyone has come up with a good solution.
Ideally it'd be fixed by Polymer but maybe that is a long shot.
Giovanni Lovato
@heruan
Nov 01 2017 18:05
I agree, Polymer's assumption is just bad design. I hope in Polymer 3 which adopts ES6 modules they'll fix this!
James Ward
@jamesward
Nov 01 2017 18:12
That'd be great
Giovanni Lovato
@heruan
Nov 01 2017 18:14
Is the Webjars team in contact with Polymer to discuss this? Any thread/issue to follow on this?
James Ward
@jamesward
Nov 01 2017 18:14
Not that I'm aware of
Giovanni Lovato
@heruan
Nov 01 2017 18:28
I've just issued Polymer/polymer#4912
Hope many here will thumbs up and follow-up :smile:
James Ward
@jamesward
Nov 01 2017 18:29
Thanks!