Skip to content

Commit

Permalink
fix: make sourcemaps work in test (#1447)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLarkInn authored Jul 26, 2016
1 parent 3d22394 commit 9d42071
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion addon/ng2/models/webpack-build-test.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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,
Expand All @@ -89,4 +96,4 @@ const getWebpackTestConfig = function(projectRoot, sourceDir) {
};
}

module.exports.getWebpackTestConfig = getWebpackTestConfig;
module.exports.getWebpackTestConfig = getWebpackTestConfig;

0 comments on commit 9d42071

Please sign in to comment.