{"action":"created","issue":{"url":"https://api.github.com/repos/spark/particle-api-js/issues/13","repository_url":"https://api.github.com/repos/spark/particle-api-js","labels_url":"https://api.github.com/repos/spark/particle-api-js/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/spark/particle-api-js/issues/13/comments","events_url":"https://api.github.com/repos/spark/particle-api-js/issues/13/events","html_url":"https://github.com/spark/particle-api-js/issues/13","id":143761359,"number":13,"title":"Replace babel-polyfill with babel-runtime transform","user":{"login":"lourd","id":2012388,"avatar_url":"https://avatars.githubusercontent.com/u/2012388?v=3","gravatar_id":"","url":"https://api.github.com/users/lourd","html_url":"https://github.com/lourd","followers_url":"https://api.github.com/users/lourd/followers","following_url":"https://api.github.com/users/lourd/following{/other_user}","gists_url":"https://api.github.com/users/lourd/gists{/gist_id}","starred_url":"https://api.github.com/users/lourd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lourd/subscriptions","organizations_url":"https://api.github.com/users/lourd/orgs","repos_url":"https://api.github.com/users/lourd/repos","events_url":"https://api.github.com/users/lourd/events{/privacy}","received_events_url":"https://api.github.com/users/lourd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-27T00:14:42Z","updated_at":"2016-03-29T19:06:21Z","closed_at":null,"body":"The way that babel-polyfill is [being used](https://github.com/spark/particle-api-js/blob/master/src/Particle.js#L1) pollutes the runtime environment with feature polyfills that may not be wanted or needed by app developers. For instance, polyfilling Promises when Node 4 and 5 have them natively. \r\n\r\n[This article](https://medium.com/@jcse/clearing-up-the-babel-6-ecosystem-c7678a314bf3#.yn6j8qy6j) is a good explanation on the difference between `babel-polyfill` and `babel-runtime`. \r\n\r\nThe recommended solution is to depend on `babel-runtime` and use the [transform-runtime Babel plugin](http://babeljs.io/docs/plugins/transform-runtime/)."},"comment":{"url":"https://api.github.com/repos/spark/particle-api-js/issues/comments/203053983","html_url":"https://github.com/spark/particle-api-js/issues/13#issuecomment-203053983","issue_url":"https://api.github.com/repos/spark/particle-api-js/issues/13","id":203053983,"user":{"login":"brycekahle","id":1010430,"avatar_url":"https://avatars.githubusercontent.com/u/1010430?v=3","gravatar_id":"","url":"https://api.github.com/users/brycekahle","html_url":"https://github.com/brycekahle","followers_url":"https://api.github.com/users/brycekahle/followers","following_url":"https://api.github.com/users/brycekahle/following{/other_user}","gists_url":"https://api.github.com/users/brycekahle/gists{/gist_id}","starred_url":"https://api.github.com/users/brycekahle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brycekahle/subscriptions","organizations_url":"https://api.github.com/users/brycekahle/orgs","repos_url":"https://api.github.com/users/brycekahle/repos","events_url":"https://api.github.com/users/brycekahle/events{/privacy}","received_events_url":"https://api.github.com/users/brycekahle/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T19:06:20Z","updated_at":"2016-03-29T19:06:20Z","body":"That works for syntax transforms but not runtime dependencies."}}