Skip to content

Commit 9d42071

Browse files
authored
fix: make sourcemaps work in test (#1447)
1 parent 3d22394 commit 9d42071

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

addon/ng2/models/webpack-build-test.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// this config must be JS so that the karma plugin can load it
22

33
const path = require('path');
4+
const webpack = require('webpack');
45

56
const getWebpackTestConfig = function(projectRoot, sourceDir) {
67
return {
@@ -73,6 +74,12 @@ const getWebpackTestConfig = function(projectRoot, sourceDir) {
7374
}
7475
]
7576
},
77+
plugins: [
78+
new webpack.SourceMapDevToolPlugin({
79+
filename: null, // if no value is provided the sourcemap is inlined
80+
test: /\.(ts|js)($|\?)/i // process .js and .ts files only
81+
})
82+
],
7683
tslint: {
7784
emitErrors: false,
7885
failOnHint: false,
@@ -89,4 +96,4 @@ const getWebpackTestConfig = function(projectRoot, sourceDir) {
8996
};
9097
}
9198

92-
module.exports.getWebpackTestConfig = getWebpackTestConfig;
99+
module.exports.getWebpackTestConfig = getWebpackTestConfig;

0 commit comments

Comments
 (0)