Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ergonomics around defining importPath in modules #5163

Closed
kevinpschaaf opened this issue Mar 26, 2018 · 0 comments
Closed

Improve ergonomics around defining importPath in modules #5163

kevinpschaaf opened this issue Mar 26, 2018 · 0 comments
Labels

Comments

@kevinpschaaf
Copy link
Member

Description

When defining elements in ES modules, the library cannot automatically find the import path to set importPath for data-binding use in templates (in HTML Imports the ownerDocument of the template was used to make this automatic). As such, users must manually write a static get importPath getter in their module, with the notion was that they could just return import.meta.url. However, importPath must be a folder URL ending in /, whereas import.meta.url returns a filename.

Ideally the library would accept a filename and take its folder name, or else we could consider accepting the meta object directly (via a differently named getter?) to allow more flexibility in the future.

Versions

  • Polymer: v3.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant