{"action":"created","issue":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/1104","labels_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1104/labels{/name}","comments_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1104/comments","events_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1104/events","html_url":"https://github.com/jspm/jspm-cli/issues/1104","id":105386666,"number":1104,"title":"Source maps from \"jspm bundle -m\" no longer working","user":{"login":"theefer","id":36964,"avatar_url":"https://avatars.githubusercontent.com/u/36964?v=3","gravatar_id":"","url":"https://api.github.com/users/theefer","html_url":"https://github.com/theefer","followers_url":"https://api.github.com/users/theefer/followers","following_url":"https://api.github.com/users/theefer/following{/other_user}","gists_url":"https://api.github.com/users/theefer/gists{/gist_id}","starred_url":"https://api.github.com/users/theefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theefer/subscriptions","organizations_url":"https://api.github.com/users/theefer/orgs","repos_url":"https://api.github.com/users/theefer/repos","events_url":"https://api.github.com/users/theefer/events{/privacy}","received_events_url":"https://api.github.com/users/theefer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jspm/jspm-cli/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-08T13:56:03Z","updated_at":"2015-09-09T16:52:15Z","closed_at":null,"body":"We have found that source maps produced by `jspm bundle -m` (0.16) are no longer applying correctly. Without the minification step the source maps is perfectly fine. It seems mostly an issue around resolving minified tokens.\r\n\r\nI initially thought it was related to use of plugins in imports etc, but I have been able to reproduce with a very reduced test case with the following source and the resulting source map still doesn't resolve variable names correctly in Chrome:\r\n\r\n``` js\r\nfunction hello(world) {\r\n    const abcde = 'var';\r\n    const other = abcde + ' ' + world;\r\n    console.log(other);\r\n    return other.length;\r\n}\r\n\r\nhello('you');\r\n\r\nexport default hello;\r\n```\r\n\r\nI've tried this [sourcemap-validator tool](https://github.com/ben-ng/sourcemap-validator) and it passes fine with unminified bundles, but fails with the minified bundled source above with:\r\n\r\n```\r\n/tmp/node_modules/sourcemap-validator/index.js:140\r\n          throw new Error(errMsg);\r\n                ^\r\nError: Warning: mismatched names\r\nExpected: System || 'System' || 'System' || \"System\" || \"System\"\r\nGot: functi || function || function || function || function\r\nOriginal Line: function hello(world) {\r\nMapping: 1:0→1:0 \"System\" in test.js\r\n    at /tmp/node_modules/sourcemap-validator/index.js:140:17\r\n    at Array.forEach (native)\r\n    at SourceMapConsumer_eachMapping [as eachMapping] (/tmp/node_modules/sourcemap-validator/node_modules/source-map/lib/source-map/source-map-consumer.js:570:10)\r\n    at validate (/tmp/node_modules/sourcemap-validator/index.js:79:12)\r\n    at Object.<anonymous> (/tmp/validate.js:6:1)\r\n    at Module._compile (module.js:456:26)\r\n```\r\n\r\nAgain likely some issue with the token names.\r\n\r\nWas there any change in jspm 0.16 that could explain this? Any pointers as to where I should be looking next?"},"comment":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/comments/138972894","html_url":"https://github.com/jspm/jspm-cli/issues/1104#issuecomment-138972894","issue_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1104","id":138972894,"user":{"login":"theefer","id":36964,"avatar_url":"https://avatars.githubusercontent.com/u/36964?v=3","gravatar_id":"","url":"https://api.github.com/users/theefer","html_url":"https://github.com/theefer","followers_url":"https://api.github.com/users/theefer/followers","following_url":"https://api.github.com/users/theefer/following{/other_user}","gists_url":"https://api.github.com/users/theefer/gists{/gist_id}","starred_url":"https://api.github.com/users/theefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theefer/subscriptions","organizations_url":"https://api.github.com/users/theefer/orgs","repos_url":"https://api.github.com/users/theefer/repos","events_url":"https://api.github.com/users/theefer/events{/privacy}","received_events_url":"https://api.github.com/users/theefer/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T16:52:15Z","updated_at":"2015-09-09T16:52:15Z","body":"Also interesting to note that when bundling with Babel I don't get any error when running the files through the sourcemap-validator tool. Still not working in Chrome though :-/"}}