{"action":"opened","issue":{"url":"https://api.github.com/repos/x-tag/core/issues/200","repository_url":"https://api.github.com/repos/x-tag/core","labels_url":"https://api.github.com/repos/x-tag/core/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/x-tag/core/issues/200/comments","events_url":"https://api.github.com/repos/x-tag/core/issues/200/events","html_url":"https://github.com/x-tag/core/issues/200","id":318072488,"number":200,"title":"XTagElement is not defined","user":{"login":"pws019","id":15248275,"avatar_url":"https://avatars0.githubusercontent.com/u/15248275?v=4","gravatar_id":"","url":"https://api.github.com/users/pws019","html_url":"https://github.com/pws019","followers_url":"https://api.github.com/users/pws019/followers","following_url":"https://api.github.com/users/pws019/following{/other_user}","gists_url":"https://api.github.com/users/pws019/gists{/gist_id}","starred_url":"https://api.github.com/users/pws019/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pws019/subscriptions","organizations_url":"https://api.github.com/users/pws019/orgs","repos_url":"https://api.github.com/users/pws019/repos","events_url":"https://api.github.com/users/pws019/events{/privacy}","received_events_url":"https://api.github.com/users/pws019/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-26T15:07:34Z","updated_at":"2018-04-26T15:07:34Z","closed_at":null,"author_association":"NONE","body":"when I use webpack&babel,\r\nthe result show \"XTagElement is not defined\"\r\n\r\n.babelrc\r\n``` json\r\n{\r\n  \"presets\": [\r\n    \"env\"\r\n  ]\r\n}\r\n```\r\n\r\nwebpack\r\n``` js\r\n{\r\n   test:/\\.js$/,\r\n   use:{\r\n            loader:'babel-loader'\r\n   },\r\n   //exclude: /node_modules/\r\n}\r\n```\r\n\r\nindex.js\r\n``` es6\r\n\r\nimport '../css/index.css';\r\nimport {xtag, XTagElement} from 'x-tag';\r\n\r\nvar PraiseBtn = xtag.create('praise-button',class extends XTagElement{\r\n\r\n  constructor() {\r\n    super();\r\n    console.log('xtag init');\r\n  }\r\n\r\n  '::template(true)' () {\r\n    return `\r\n      <div class=\"praise-btn\">这是一个praiseButton</div>\r\n    `\r\n  };\r\n\r\n  'click::event' () {\r\n    console.log('click-element');\r\n  }\r\n})\r\n\r\nexport default PraiseBtn;\r\n```\r\n\r\nindex.html\r\n```html\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n  <meta charset=\"UTF-8\">\r\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n  <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\r\n  <!-- <script src=\"https://cdn.bootcss.com/x-tag/2.0.9-alpha/x-tag-polyfilled.js\"></script> -->\r\n  <title>Document</title>\r\n</head>\r\n<body>\r\n  <praise-button></praise-button>\r\n<script type=\"text/javascript\" src=\"./assets/js/index.js\"></script></body>\r\n</html>\r\n```\r\n\r\nthe result:\r\n![image](https://user-images.githubusercontent.com/15248275/39314279-7a05c77a-49a6-11e8-9e2a-f604f5b2bdb8.png)\r\n\r\n# how can I fix the problem?"}}
{"actor":{"display_login":"pws019"}}