Closed kumpelblase2 closed 7 years ago
Well, we deliver all the elements in the library under the bower_components folder, which is quite standard name. Anyway, if you import your own element before you use it, for instance in your index.html or calling Polymer.importHref with your URL, the ensureCustomElement should detect that the web component is registered and shouldn't do any request, at least using 1.7.0.0-SNAPSHOT
Another option could be that bower_components could be configurable via a static method, or something, but then you need to provide all the elements you use like iron-icon etc in your component folder. Or do you have better idea ?
When using the polymer elements without creating custom web components, this is non-issue. However, when I would use
PolymerWidget
as a base for my own component, being forced to have my html files somewhere underbower_components
is irritating and inconvenient. If I don't Polymer will fail to load them, becausebower_components
will get added to front one way or another.So things like these structures totally fail:
I think all of these situations should be possible somehow. Right now I would have to do the following to get the desired behavior:
Polymer.ensureCustomElement()
)This seems too much work for something this basic.