{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/7189","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/7189/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/7189/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/7189/events","html_url":"https://github.com/facebook/react-native/issues/7189","id":150647224,"number":7189,"title":"Packager bug with ES2015 exports","user":{"login":"radev","id":126689,"avatar_url":"https://avatars.githubusercontent.com/u/126689?v=3","gravatar_id":"","url":"https://api.github.com/users/radev","html_url":"https://github.com/radev","followers_url":"https://api.github.com/users/radev/followers","following_url":"https://api.github.com/users/radev/following{/other_user}","gists_url":"https://api.github.com/users/radev/gists{/gist_id}","starred_url":"https://api.github.com/users/radev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radev/subscriptions","organizations_url":"https://api.github.com/users/radev/orgs","repos_url":"https://api.github.com/users/radev/repos","events_url":"https://api.github.com/users/radev/events{/privacy}","received_events_url":"https://api.github.com/users/radev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-24T10:20:56Z","updated_at":"2016-04-25T11:01:30Z","closed_at":null,"body":"Looks like when ES2015 export (default or named) is used then multiple lines are combined into one.\r\n\r\nE.g. following code\r\n```javascript\r\nimport { View } from 'react-native';\r\n\r\nconst x = View.propTypes.style;\r\n\r\nexport default function Test() {\r\n  return <View />;\r\n}\r\n```\r\n \r\nis compiled to \r\n\r\n```javascript\r\n__d(776 /* TestApp/src/test.js */, function(global, require, module, exports) {Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=\r\n\r\n\r\n\r\nTest;var _reactNative=require(11 /* react-native */);var x=_reactNative.View.propTypes.style;function Test(){\r\nreturn React.createElement(_reactNative.View,null);}\r\n});\r\n```\r\nMultiple source lines are collapsed to one and this makes debugging a lot harder as often we're unable to place breakpoints where needed.\r\n\r\nIf I convert export to use CommonJS:\r\n```javascript\r\nimport { View } from 'react-native';\r\n\r\nconst x = View.propTypes.style;\r\n\r\nmodule.exports = function Test() {\r\n  return <View />;\r\n};\r\n```\r\nthen it compiles to:\r\n```javascript\r\n__d(776 /* TestApp/src/test.js */, function(global, require, module, exports) {var _reactNative=require(11 /* react-native */);\r\n\r\nvar x=_reactNative.View.propTypes.style;\r\n\r\nmodule.exports=function Test(){\r\nreturn React.createElement(_reactNative.View,null);};\r\n});\r\n```\r\nYou can see that x assignment is on it's own line.\r\n\r\nThis is on react-native version 0.24.1. Linux & Android"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/214265688","html_url":"https://github.com/facebook/react-native/issues/7189#issuecomment-214265688","issue_url":"https://api.github.com/repos/facebook/react-native/issues/7189","id":214265688,"user":{"login":"mroswald","id":4459348,"avatar_url":"https://avatars.githubusercontent.com/u/4459348?v=3","gravatar_id":"","url":"https://api.github.com/users/mroswald","html_url":"https://github.com/mroswald","followers_url":"https://api.github.com/users/mroswald/followers","following_url":"https://api.github.com/users/mroswald/following{/other_user}","gists_url":"https://api.github.com/users/mroswald/gists{/gist_id}","starred_url":"https://api.github.com/users/mroswald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mroswald/subscriptions","organizations_url":"https://api.github.com/users/mroswald/orgs","repos_url":"https://api.github.com/users/mroswald/repos","events_url":"https://api.github.com/users/mroswald/events{/privacy}","received_events_url":"https://api.github.com/users/mroswald/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T11:01:30Z","updated_at":"2016-04-25T11:01:30Z","body":"Is that related to #6946 ? Btw - sourceMaps should be able to handle this since they can map not only bundle:line to source:line (they do bundle:line.col => source:line.col, right?)"}}