{"action":"created","issue":{"url":"https://api.github.com/repos/BohemianCoding/svgo-compressor/issues/48","repository_url":"https://api.github.com/repos/BohemianCoding/svgo-compressor","labels_url":"https://api.github.com/repos/BohemianCoding/svgo-compressor/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/BohemianCoding/svgo-compressor/issues/48/comments","events_url":"https://api.github.com/repos/BohemianCoding/svgo-compressor/issues/48/events","html_url":"https://github.com/BohemianCoding/svgo-compressor/issues/48","id":392914448,"node_id":"MDU6SXNzdWUzOTI5MTQ0NDg=","number":48,"title":"Facing issue in extending svgo-compressor","user":{"login":"arorayash","id":10823530,"node_id":"MDQ6VXNlcjEwODIzNTMw","avatar_url":"https://avatars3.githubusercontent.com/u/10823530?v=4","gravatar_id":"","url":"https://api.github.com/users/arorayash","html_url":"https://github.com/arorayash","followers_url":"https://api.github.com/users/arorayash/followers","following_url":"https://api.github.com/users/arorayash/following{/other_user}","gists_url":"https://api.github.com/users/arorayash/gists{/gist_id}","starred_url":"https://api.github.com/users/arorayash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arorayash/subscriptions","organizations_url":"https://api.github.com/users/arorayash/orgs","repos_url":"https://api.github.com/users/arorayash/repos","events_url":"https://api.github.com/users/arorayash/events{/privacy}","received_events_url":"https://api.github.com/users/arorayash/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-20T06:54:16Z","updated_at":"2018-12-20T07:38:41Z","closed_at":null,"author_association":"NONE","body":"Hey, I wanted to export the compressed SVG as a JSX, I'm able to achieve this functionality through cli using [svg-to-jsx](https://www.npmjs.com/package/svg-to-jsx), but when I tried to import the svg-to-jsx module in the `/src/plugin.js` file, the following error is thrown -\r\n\r\n<img width=\"869\" alt=\"screenshot 2018-12-16 at 10 04 20 pm\" src=\"https://user-images.githubusercontent.com/10823530/50268573-51a2da00-0451-11e9-8415-0b9fda9714e5.png\">\r\n\r\n`svg-to-jsx` follows commonJs pattern, so import should work just fine but it isn't in the case.\r\n\r\nCan you please guide me if I'm doing something wrong?\r\n"},"comment":{"url":"https://api.github.com/repos/BohemianCoding/svgo-compressor/issues/comments/448902701","html_url":"https://github.com/BohemianCoding/svgo-compressor/issues/48#issuecomment-448902701","issue_url":"https://api.github.com/repos/BohemianCoding/svgo-compressor/issues/48","id":448902701,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODkwMjcwMQ==","user":{"login":"mathieudutour","id":3254314,"node_id":"MDQ6VXNlcjMyNTQzMTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3254314?v=4","gravatar_id":"","url":"https://api.github.com/users/mathieudutour","html_url":"https://github.com/mathieudutour","followers_url":"https://api.github.com/users/mathieudutour/followers","following_url":"https://api.github.com/users/mathieudutour/following{/other_user}","gists_url":"https://api.github.com/users/mathieudutour/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieudutour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieudutour/subscriptions","organizations_url":"https://api.github.com/users/mathieudutour/orgs","repos_url":"https://api.github.com/users/mathieudutour/repos","events_url":"https://api.github.com/users/mathieudutour/events{/privacy}","received_events_url":"https://api.github.com/users/mathieudutour/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T07:38:41Z","updated_at":"2018-12-20T07:38:41Z","author_association":"CONTRIBUTOR","body":"You are not doing anything wrong. It's because `svg-to-jsx` is depending on `xml2js` which uses a deprecated method (`require('events').EventEmitter` while it should just be `require('events')`).\r\n\r\nThe plugin is not running in Node so the `events` module is actually a polyfill that I wrote: https://github.com/skpm/events and I didn't polyfill the deprecated methods. Maybe I should."}}
{"actor":{"display_login":"mathieudutour"}}