{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/karma-webpack/issues/109","repository_url":"https://api.github.com/repos/webpack/karma-webpack","labels_url":"https://api.github.com/repos/webpack/karma-webpack/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/webpack/karma-webpack/issues/109/comments","events_url":"https://api.github.com/repos/webpack/karma-webpack/issues/109/events","html_url":"https://github.com/webpack/karma-webpack/issues/109","id":138147922,"number":109,"title":"Sourcemaps with normal Usage, not Alternative usage","user":{"login":"BrainCrumbz","id":3185573,"avatar_url":"https://avatars.githubusercontent.com/u/3185573?v=3","gravatar_id":"","url":"https://api.github.com/users/BrainCrumbz","html_url":"https://github.com/BrainCrumbz","followers_url":"https://api.github.com/users/BrainCrumbz/followers","following_url":"https://api.github.com/users/BrainCrumbz/following{/other_user}","gists_url":"https://api.github.com/users/BrainCrumbz/gists{/gist_id}","starred_url":"https://api.github.com/users/BrainCrumbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrainCrumbz/subscriptions","organizations_url":"https://api.github.com/users/BrainCrumbz/orgs","repos_url":"https://api.github.com/users/BrainCrumbz/repos","events_url":"https://api.github.com/users/BrainCrumbz/events{/privacy}","received_events_url":"https://api.github.com/users/BrainCrumbz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-03-03T11:09:13Z","updated_at":"2016-06-09T17:06:31Z","closed_at":null,"body":"We're having troubles trying to make source maps work with typescript spec source files and *main* source files.\r\n\r\nIf we stick with the *Alternative usage* described [here](https://github.com/webpack/karma-webpack#alternative-usage), then generate source maps as suggested in following section [here](https://github.com/webpack/karma-webpack#source-maps), we can happily browse typescript code from Chrome developer tools while debugging tests.\r\n\r\nIf we stick with the *basic* usage described [here](https://github.com/webpack/karma-webpack#usage), and we load spec files through `karma.conf.js`, instead of `require`-ing them in test shim single entry point, it looks like sourcemaps stop working. Browser developer tools only show JS webpack-prepared bundles, not original typescript source files.\r\n\r\nIs this second way feasible at all? Can anybody explain how to get there? Thanks for your time!"},"comment":{"url":"https://api.github.com/repos/webpack/karma-webpack/issues/comments/224961264","html_url":"https://github.com/webpack/karma-webpack/issues/109#issuecomment-224961264","issue_url":"https://api.github.com/repos/webpack/karma-webpack/issues/109","id":224961264,"user":{"login":"sshev","id":11736711,"avatar_url":"https://avatars.githubusercontent.com/u/11736711?v=3","gravatar_id":"","url":"https://api.github.com/users/sshev","html_url":"https://github.com/sshev","followers_url":"https://api.github.com/users/sshev/followers","following_url":"https://api.github.com/users/sshev/following{/other_user}","gists_url":"https://api.github.com/users/sshev/gists{/gist_id}","starred_url":"https://api.github.com/users/sshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sshev/subscriptions","organizations_url":"https://api.github.com/users/sshev/orgs","repos_url":"https://api.github.com/users/sshev/repos","events_url":"https://api.github.com/users/sshev/events{/privacy}","received_events_url":"https://api.github.com/users/sshev/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T17:06:31Z","updated_at":"2016-06-09T17:06:31Z","body":"Here's native solution to make source map work in typescript unit tests:\r\ninclude `SourceMapDevToolPlugin ` plugin to webpack config and configure it to process `.ts` files as well:\r\n```javascript\r\nplugins: [\r\n  new webpack.SourceMapDevToolPlugin({\r\n    filename: null, // if no value is provided the sourcemap is inlined\r\n    test: /\\.(ts|js)($|\\?)/i // process .js and .ts files only\r\n  })\r\n]\r\n```"}}
{"actor":{"display_login":"sshev"}}