Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): use sourcemap object in karma plu…
Browse files Browse the repository at this point in the history
…gin (#13584)

Followup to #13062

Fix #13580
  • Loading branch information
filipesilva authored and vikerman committed Feb 6, 2019
1 parent a013930 commit acc31ba
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -18,6 +18,7 @@ import { statsErrorsToString } from '../utilities/stats';
import { getWebpackStatsConfig } from '../models/webpack-configs/stats';
import { createConsoleLogger } from '@angular-devkit/core/node';
import { logging } from '@angular-devkit/core';
import { WebpackTestOptions } from '../models/build-options';

/**
* Enumerate needed (but not require/imported) dependencies from this file
Expand Down Expand Up @@ -63,7 +64,7 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => {
` be used from within Angular CLI and will not work correctly outside of it.`
)
}
const options = config.buildWebpack.options;
const options = config.buildWebpack.options as WebpackTestOptions;
const logger: logging.Logger = config.buildWebpack.logger || createConsoleLogger();
successCb = config.buildWebpack.successCb;
failureCb = config.buildWebpack.failureCb;
Expand All @@ -77,7 +78,7 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => {
}

// Add a reporter that fixes sourcemap urls.
if (options.sourceMap) {
if (options.sourceMap.scripts) {
config.reporters.unshift('@angular-devkit/build-angular--sourcemap-reporter');

// Code taken from https://github.com/tschaub/karma-source-map-support.
Expand Down

0 comments on commit acc31ba

Please sign in to comment.