{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/vulcanize/issues/263","repository_url":"https://api.github.com/repos/Polymer/vulcanize","labels_url":"https://api.github.com/repos/Polymer/vulcanize/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/vulcanize/issues/263/comments","events_url":"https://api.github.com/repos/Polymer/vulcanize/issues/263/events","html_url":"https://github.com/Polymer/vulcanize/issues/263","id":110993081,"number":263,"title":"Vulcanize doesn't understand ES6 class-based declarations that use `beforeRegister` to set `is`","user":{"login":"nicolasgarnier","id":3766663,"avatar_url":"https://avatars.githubusercontent.com/u/3766663?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasgarnier","html_url":"https://github.com/nicolasgarnier","followers_url":"https://api.github.com/users/nicolasgarnier/followers","following_url":"https://api.github.com/users/nicolasgarnier/following{/other_user}","gists_url":"https://api.github.com/users/nicolasgarnier/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasgarnier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasgarnier/subscriptions","organizations_url":"https://api.github.com/users/nicolasgarnier/orgs","repos_url":"https://api.github.com/users/nicolasgarnier/repos","events_url":"https://api.github.com/users/nicolasgarnier/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasgarnier/received_events","type":"User","site_admin":false},"labels":[{"id":335147614,"url":"https://api.github.com/repos/Polymer/vulcanize/labels/Priority:%20Medium","name":"Priority: Medium","color":"fbca04","default":false},{"id":335147620,"url":"https://api.github.com/repos/Polymer/vulcanize/labels/Status:%20Accepted","name":"Status: Accepted","color":"009800","default":false},{"id":335147625,"url":"https://api.github.com/repos/Polymer/vulcanize/labels/Type:%20Bug","name":"Type: Bug","color":"e11d21","default":false}],"state":"open","locked":false,"assignee":{"login":"garlicnation","id":1105965,"avatar_url":"https://avatars.githubusercontent.com/u/1105965?v=3","gravatar_id":"","url":"https://api.github.com/users/garlicnation","html_url":"https://github.com/garlicnation","followers_url":"https://api.github.com/users/garlicnation/followers","following_url":"https://api.github.com/users/garlicnation/following{/other_user}","gists_url":"https://api.github.com/users/garlicnation/gists{/gist_id}","starred_url":"https://api.github.com/users/garlicnation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garlicnation/subscriptions","organizations_url":"https://api.github.com/users/garlicnation/orgs","repos_url":"https://api.github.com/users/garlicnation/repos","events_url":"https://api.github.com/users/garlicnation/events{/privacy}","received_events_url":"https://api.github.com/users/garlicnation/received_events","type":"User","site_admin":false},"assignees":[{"login":"garlicnation","id":1105965,"avatar_url":"https://avatars.githubusercontent.com/u/1105965?v=3","gravatar_id":"","url":"https://api.github.com/users/garlicnation","html_url":"https://github.com/garlicnation","followers_url":"https://api.github.com/users/garlicnation/followers","following_url":"https://api.github.com/users/garlicnation/following{/other_user}","gists_url":"https://api.github.com/users/garlicnation/gists{/gist_id}","starred_url":"https://api.github.com/users/garlicnation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garlicnation/subscriptions","organizations_url":"https://api.github.com/users/garlicnation/orgs","repos_url":"https://api.github.com/users/garlicnation/repos","events_url":"https://api.github.com/users/garlicnation/events{/privacy}","received_events_url":"https://api.github.com/users/garlicnation/received_events","type":"User","site_admin":false}],"milestone":null,"comments":17,"created_at":"2015-10-12T15:03:44Z","updated_at":"2016-11-03T17:26:28Z","closed_at":null,"body":"It seems that vulcanize is currently not correctly finding out the name (the `is` attribute) of the Polymer elements definition written as an ES6/ES2015 Class. When multiple elements definition as classes are present we get the following error/warning printed for each additional elements:\n\n```\nIgnoring duplicate element definition: undefined\n```\n\nBelow is the minimal source file to replicate the issue:\n\n**my-element.html**\n\n``` html\n<html>\n<head>\n  <link rel=\"import\" href=\"bower_components/polymer/polymer.html\">\n</head>\n<body>\n<dom-module id=\"my-element\">\n  <template>\n    <div>Hello World</div>\n  </template>\n\n</dom-module>\n<script>\n  class MyElement {\n    beforeRegister() {\n      this.is = 'my-element';\n    }\n  }\n  Polymer(MyElement);\n\n  class MyElement2 {\n    beforeRegister() {\n      this.is = 'my-element-2';\n    }\n  }\n  Polymer(MyElement2);\n\n  class MyElement3 {\n    beforeRegister() {\n      this.is = 'my-element-3';\n    }\n  }\n  Polymer(MyElement3);\n</script>\n</body>\n</html>\n```\n\nThen run `vulcanize my-element.html > /dev/null` and you'll get the following output on the console:\n\n``` bash\nIgnoring duplicate element definition: undefined\nIgnoring duplicate element definition: undefined\n```\n"},"comment":{"url":"https://api.github.com/repos/Polymer/vulcanize/issues/comments/258213742","html_url":"https://github.com/Polymer/vulcanize/issues/263#issuecomment-258213742","issue_url":"https://api.github.com/repos/Polymer/vulcanize/issues/263","id":258213742,"user":{"login":"robdodson","id":1066253,"avatar_url":"https://avatars.githubusercontent.com/u/1066253?v=3","gravatar_id":"","url":"https://api.github.com/users/robdodson","html_url":"https://github.com/robdodson","followers_url":"https://api.github.com/users/robdodson/followers","following_url":"https://api.github.com/users/robdodson/following{/other_user}","gists_url":"https://api.github.com/users/robdodson/gists{/gist_id}","starred_url":"https://api.github.com/users/robdodson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robdodson/subscriptions","organizations_url":"https://api.github.com/users/robdodson/orgs","repos_url":"https://api.github.com/users/robdodson/repos","events_url":"https://api.github.com/users/robdodson/events{/privacy}","received_events_url":"https://api.github.com/users/robdodson/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T17:26:28Z","updated_at":"2016-11-03T17:26:28Z","body":"@mtsgrd I wouldn't recommend building any production code on Polymer 2.0 just yet. It's still in a very early alpha stage. When it's released we'll be sure to have a build pipeline setup probably using Polymer CLI."}}
{"actor":{"display_login":"robdodson"}}