Skip to content

Lightweight alternative for lazy imports #114

@tpluscode

Description

@tpluscode

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 of importHref (correct depending on version of Polymer used) so that

Polymer.importHref('bower:paper-input/paper-input.html');

becomes

Polymer.importHref('../../bower_components/paper-input/paper-input.html');

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions