{"action":"opened","issue":{"url":"https://api.github.com/repos/TypeStrong/ts-loader/issues/81","labels_url":"https://api.github.com/repos/TypeStrong/ts-loader/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/TypeStrong/ts-loader/issues/81/comments","events_url":"https://api.github.com/repos/TypeStrong/ts-loader/issues/81/events","html_url":"https://github.com/TypeStrong/ts-loader/issues/81","id":110759005,"number":81,"title":"Issues with source-map generation","user":{"login":"jbbr","id":682607,"avatar_url":"https://avatars.githubusercontent.com/u/682607?v=3","gravatar_id":"","url":"https://api.github.com/users/jbbr","html_url":"https://github.com/jbbr","followers_url":"https://api.github.com/users/jbbr/followers","following_url":"https://api.github.com/users/jbbr/following{/other_user}","gists_url":"https://api.github.com/users/jbbr/gists{/gist_id}","starred_url":"https://api.github.com/users/jbbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbbr/subscriptions","organizations_url":"https://api.github.com/users/jbbr/orgs","repos_url":"https://api.github.com/users/jbbr/repos","events_url":"https://api.github.com/users/jbbr/events{/privacy}","received_events_url":"https://api.github.com/users/jbbr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-10T01:17:06Z","updated_at":"2015-10-10T01:17:06Z","closed_at":null,"body":"Enabling source map support in webpack config does not work properly with this loader. It depends on the `devtool` option choosen:\r\n\r\n`devtool: 'source-map'`:\r\n```\r\n/home/user/Develop/myproject/node_modules/webpack-core/node_modules/source-map/lib/source-map/array-set.js:93\r\n    throw new Error('No element indexed by ' + aIdx);\r\n    ^\r\n\r\nError: No element indexed by 1\r\n    at ArraySet_at [as at] (/home/user/Develop/myproject/node_modules/webpack-core/node_modules/source-map/lib/source-map/array-set.js:93:11)\r\n    at SourceMapConsumer.<anonymous> (/home/user/Develop/myproject/node_modules/webpack-core/node_modules/source-map/lib/source-map/source-map-consumer.js:147:69)\r\n    at Array.map (native)\r\n    at SourceMapConsumer_eachMapping [as eachMapping] (/home/user/Develop/myproject/node_modules/webpack-core/node_modules/source-map/lib/source-map/source-map-consumer.js:146:16)\r\n    at Function.SourceNode_fromStringWithSourceMap [as fromStringWithSourceMap] (/home/user/Develop/myproject/node_modules/webpack-core/node_modules/source-map/lib/source-map/source-node.js:84:26)\r\n    at SourceMapSource.node (/home/user/Develop/myproject/node_modules/webpack-core/lib/SourceMapSource.js:41:20)\r\n    at ReplaceSource.node (/home/user/Develop/myproject/node_modules/webpack-core/lib/ReplaceSource.js:55:29)\r\n    at CachedSource.node (/home/user/Develop/myproject/node_modules/webpack-core/lib/CachedSource.js:41:22)\r\n    at PrefixSource.node (/home/user/Develop/myproject/node_modules/webpack-core/lib/PrefixSource.js:27:26)\r\n    at /home/user/Develop/myproject/node_modules/webpack-core/lib/ConcatSource.js:38:49\r\n    at Array.map (native)\r\n    at ConcatSource.node (/home/user/Develop/myproject/node_modules/webpack-core/lib/ConcatSource.js:37:60)\r\n    at /home/user/Develop/myproject/node_modules/webpack-core/lib/ConcatSource.js:38:49\r\n    at Array.map (native)\r\n    at ConcatSource.node (/home/user/Develop/myproject/node_modules/webpack-core/lib/ConcatSource.js:37:60)\r\n    at /home/user/Develop/myproject/node_modules/webpack-core/lib/ConcatSource.js:38:49\r\n```\r\n\r\n`devtool: 'eval-source-map'`:\r\n```\r\nERROR in chunk main [entry]\r\nclient.bundle.js\r\nNo element indexed by 1\r\n```\r\n\r\n`devtool: 'eval'`: Everything works as expected (But source maps are not as readable as usually with the other options.\r\n\r\nWith https://github.com/s-panferov/awesome-typescript-loader I don't have this problem"}}