From 418c3c247ac274deda41030e5cfd808fce2f6970 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 85ee42731983..7d7dba6630b5 100644 --- a/packages/@angular/cli/models/webpack-configs/common.ts +++ b/packages/@angular/cli/models/webpack-configs/common.ts @@ -65,15 +65,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:///' - })); - } - if (buildOptions.showCircularDependencies) { extraPlugins.push(new CircularDependencyPlugin({ exclude: /(\\|\/)node_modules(\\|\/)/