8000 fix: make sourcemaps work in ng test by TheLarkInn · Pull Request #1447 · angular/angular-cli · GitHub
[go: up one dir, main page]

Skip to content

fix: make sourcemaps work in ng test #1447

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

Merged
merged 3 commits into from
Jul 26, 2016
Merged
Changes from 1 commit
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
Next Next commit
fix: make sourcemaps work in test
  • Loading branch information
TheLarkInn committed Jul 25, 2016
commit 252b4894ee3e5563cf17ffadf5379da59b48be4e
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 @@ -74,6 +75,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 @@ -90,4 +97,4 @@ const getWebpackTestConfig = function(projectRoot, sourceDir) {
};
}

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