From 673596f82f62d69f8b450add15f336bc9aa318ed Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 2 Jul 2017 15:24:05 +0100 Subject: [PATCH] fix(@angular/cli): use inline sourcemaps in test Fix #6737 --- packages/@angular/cli/models/webpack-configs/browser.ts | 9 +++++++++ packages/@angular/cli/models/webpack-configs/common.ts | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/@angular/cli/models/webpack-configs/browser.ts b/packages/@angular/cli/models/webpack-configs/browser.ts index 782daaf5f232..6419acba2341 100644 --- a/packages/@angular/cli/models/webpack-configs/browser.ts +++ b/packages/@angular/cli/models/webpack-configs/browser.ts @@ -42,6 +42,15 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { })); } + if (buildOptions.sourcemaps) { + extraPlugins.push(new webpack.SourceMapDevToolPlugin({ + filename: '[file].map[query]', + moduleFilenameTemplate: '[resource-path]', + fallbackModuleFilenameTemplate: '[resource-path]?[hash]', + sourceRoot: 'webpack:///' + })); + } + return { plugins: [ new HtmlWebpackPlugin({ diff --git a/packages/@angular/cli/models/webpack-configs/common.ts b/packages/@angular/cli/models/webpack-configs/common.ts index a2a2707c8b12..53485ad36a33 100644 --- a/packages/@angular/cli/models/webpack-configs/common.ts +++ b/packages/@angular/cli/models/webpack-configs/common.ts @@ -63,15 +63,6 @@ export function getCommonConfig(wco: WebpackConfigOptions) { extraPlugins.push(new ProgressPlugin({ profile: buildOptions.verbose, colors: true })); } - if (buildOptions.sourcemaps) { - extraPlugins.push(new webpack.SourceMapDevToolPlugin({ - filename: '[file].map[query]', - moduleFilenameTemplate: '[resource-path]', - fallbackModuleFilenameTemplate: '[resource-path]?[hash]', - sourceRoot: 'webpack:///' - })); - } - return { resolve: { extensions: ['.ts', '.js'],