Open tpluscode opened 7 years ago
Hmm, sounds good, but it would not be as easy as one would think. Finding every Polymer.importHref
is rather easy, under the condition that nothing overrides the Polymer
name. If anything overrides it, we have false results.
Nevertheless, it's always worth implementing, just need to work out the full flow and specs for this feature.
While implementing #108 will be complex and require bending the language to our needs, I'm thinking that maybe a simple solution is possible by pre-processing
this.importHref
/Polymer.importHref
so that one can write module path instead of absolute path.For example, given an import of an element which would statically be
import 'bower:paper-input/paper-input.html'
maybe it would be possible to rewrite each used ofimportHref
(correct depending on version of Polymer used) so thatbecomes
where the path is adjusted based on the relative location and
.bowerrc
/config.As a nice bonus this could serve as an opportunity to warn if the component isn't found
bower_components
.