Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make sourcemaps work in ng test #1447

Merged
merged 3 commits into from
Jul 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;