diff --git a/karma.conf.js b/karma.conf.js index 8bb19806f..d98a12dd7 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -17,6 +17,7 @@ module.exports = function (config) { { pattern: filePattern, included: false, served: false, watched: false }, ], preprocessors: { + '**/*.js': ['sourcemap'], [fileRoot]: ['webpack'], }, reporters: ['coverage', 'mocha'], diff --git a/package.json b/package.json index b20b4e260..0722623bc 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "karma-jenkins-reporter": "0.0.2", "karma-mocha": "=1.3.0", "karma-mocha-reporter": "=2.2.3", + "karma-sourcemap-loader": "=0.3.7", "karma-verbose-reporter": "=0.0.6", "karma-webpack": "=2.0.3", "mocha": "=3.2.0", diff --git a/webpack.config.js b/webpack.config.js index 6ff47a75a..01de86326 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -27,7 +27,7 @@ module.exports = (env) => { path: path.resolve(__dirname, 'app', 'dist'), filename: env.test ? 'bundle.js' : 'bundle.[name].js', }, - devtool: 'source-map', + devtool: env.test ? 'inline-source-map' : 'source-map', devServer: { contentBase: 'src', inline: true,