diff --git a/config/webpack.config.test.js b/config/webpack.config.test.js index 37674e3..e2e984e 100644 --- a/config/webpack.config.test.js +++ b/config/webpack.config.test.js @@ -5,11 +5,6 @@ var path = require('path'); module.exports = function() { return { - /** - * Inline source maps, generated by TypeScript compiler, will be used. - */ - devtool: 'inline-source-map', - resolve: { extensions: ['', '.ts', '.js'] }, @@ -51,5 +46,12 @@ module.exports = function() } ] }, + // we use this instead of the devtool option, to force sourcemap generation for .ts files + plugins: [ + new webpack.SourceMapDevToolPlugin({ + filename: null, + test: /\.(t|j|cs)s($|\?)/i + }) + ] }; }; diff --git a/karma.conf.js b/karma.conf.js index f6692e4..640bc96 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -8,7 +8,7 @@ module.exports = function(config) // List of test frameworks we will use. Most of them are provided by separate packages (adapters). // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['mocha', 'chai', 'source-map-support'], + frameworks: ['mocha', 'chai'], // Entry point / test environment builder is also written in TypeScript. files: [ @@ -27,7 +27,8 @@ module.exports = function(config) 'coverage' ], './test/**/*.ts': [ - 'webpack' + 'webpack', + 'sourcemap' ] }, diff --git a/package.json b/package.json index c7172e6..bd1b694 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,6 @@ "karma-mocha": "^1.1.1", "karma-phantomjs-launcher": "^1.0.0", "karma-remap-istanbul": "^0.1.1", - "karma-source-map-support": "^1.1.0", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^1.7.0", "marked": "^0.3.5",