diff --git a/addon/ng2/models/webpack-build-test.js b/addon/ng2/models/webpack-build-test.js index cada4fefd3f9..3e249d549929 100644 --- a/addon/ng2/models/webpack-build-test.js +++ b/addon/ng2/models/webpack-build-test.js @@ -1,6 +1,7 @@ // this config must be JS so that the karma plugin can load it const path = require('path'); +const webpack = require('webpack'); const getWebpackTestConfig = function(projectRoot, sourceDir) { return { @@ -73,6 +74,12 @@ const getWebpackTestConfig = function(projectRoot, sourceDir) { } ] }, + plugins: [ + new webpack.SourceMapDevToolPlugin({ + filename: null, // if no value is provided the sourcemap is inlined + test: /\.(ts|js)($|\?)/i // process .js and .ts files only + }) + ], tslint: { emitErrors: false, failOnHint: false, @@ -89,4 +96,4 @@ const getWebpackTestConfig = function(projectRoot, sourceDir) { }; } -module.exports.getWebpackTestConfig = getWebpackTestConfig; \ No newline at end of file +module.exports.getWebpackTestConfig = getWebpackTestConfig;