{"action":"created","issue":{"url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/171","repository_url":"https://api.github.com/repos/exupero/saveSvgAsPng","labels_url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/171/comments","events_url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/171/events","html_url":"https://github.com/exupero/saveSvgAsPng/issues/171","id":325088664,"number":171,"title":"Failed to minify the code from this file:  ./node_modules/save-svg-as-png/saveSvgAsPng.js:3 ","user":{"login":"sulliwane","id":1733686,"avatar_url":"https://avatars3.githubusercontent.com/u/1733686?v=4","gravatar_id":"","url":"https://api.github.com/users/sulliwane","html_url":"https://github.com/sulliwane","followers_url":"https://api.github.com/users/sulliwane/followers","following_url":"https://api.github.com/users/sulliwane/following{/other_user}","gists_url":"https://api.github.com/users/sulliwane/gists{/gist_id}","starred_url":"https://api.github.com/users/sulliwane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sulliwane/subscriptions","organizations_url":"https://api.github.com/users/sulliwane/orgs","repos_url":"https://api.github.com/users/sulliwane/repos","events_url":"https://api.github.com/users/sulliwane/events{/privacy}","received_events_url":"https://api.github.com/users/sulliwane/received_events","type":"User","site_admin":false},"labels":[{"id":72381307,"url":"https://api.github.com/repos/exupero/saveSvgAsPng/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-21T23:13:21Z","updated_at":"2018-05-22T23:09:50Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI'm using this package in my [create-react-app](https://github.com/facebook/create-react-app), and when I run `npm run build` I get this error:\r\n```\r\nFailed to minify the code from this file: \r\n \t./node_modules/save-svg-as-png/saveSvgAsPng.js:3 \r\nRead more here: http://bit.ly/2tRViJ9\r\n```\r\nCould you confirm your package is not ES5 compatible?\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/comments/391169606","html_url":"https://github.com/exupero/saveSvgAsPng/issues/171#issuecomment-391169606","issue_url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/171","id":391169606,"user":{"login":"Jephuff","id":3953093,"avatar_url":"https://avatars0.githubusercontent.com/u/3953093?v=4","gravatar_id":"","url":"https://api.github.com/users/Jephuff","html_url":"https://github.com/Jephuff","followers_url":"https://api.github.com/users/Jephuff/followers","following_url":"https://api.github.com/users/Jephuff/following{/other_user}","gists_url":"https://api.github.com/users/Jephuff/gists{/gist_id}","starred_url":"https://api.github.com/users/Jephuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jephuff/subscriptions","organizations_url":"https://api.github.com/users/Jephuff/orgs","repos_url":"https://api.github.com/users/Jephuff/repos","events_url":"https://api.github.com/users/Jephuff/events{/privacy}","received_events_url":"https://api.github.com/users/Jephuff/received_events","type":"User","site_admin":false},"created_at":"2018-05-22T23:09:50Z","updated_at":"2018-05-22T23:09:50Z","author_association":"CONTRIBUTOR","body":"The problem is likely that create-react-app doesn't run node_modules through babel. \r\nA work around to this is to override create-react-app to transpile specific modules using [react-app-rewired](https://www.npmjs.com/package/react-app-rewired)\r\nwith a `config-overrides.js` file that has something like \r\n```\r\nconst path = require('path');\r\nconst fs = require('fs');\r\n\r\nconst appDirectory = fs.realpathSync(process.cwd());\r\nconst resolveApp = relativePath => path.resolve(appDirectory, relativePath);\r\nmodule.exports = function(config) {\r\n  config.module.rules[1].oneOf[1].include = [\r\n    config.module.rules[1].oneOf[1].include,\r\n    resolveApp('node_modules/save-svg-as-png'),\r\n  ];\r\n  return config;\r\n}\r\n```"}}
{"actor":{"display_login":"Jephuff"}}