Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): replace istanbul-instrumenter-loa…
Browse files Browse the repository at this point in the history
…der with coverage-istanbul-loader

Fixes #16576 and fixes #7117
  • Loading branch information
alan-agius4 authored and mgechev committed Jan 9, 2020
1 parent 4b17667 commit 653be11
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 160 deletions.
2 changes: 1 addition & 1 deletion packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"caniuse-lite": "1.0.30001019",
"circular-dependency-plugin": "5.2.0",
"clean-css": "4.2.1",
"coverage-istanbul-loader": "2.0.3",
"copy-webpack-plugin": "5.1.1",
"core-js": "3.6.2",
"file-loader": "5.0.2",
"find-cache-dir": "3.2.0",
"glob": "7.1.6",
"istanbul-instrumenter-loader": "3.0.1",
"jest-worker": "24.9.0",
"karma-source-map-support": "1.4.0",
"less": "3.10.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export function getTestConfig(
const extraRules: webpack.Rule[] = [];
const extraPlugins: webpack.Plugin[] = [];

// if (buildOptions.codeCoverage && CliConfig.fromProject()) {
if (buildOptions.codeCoverage) {
const codeCoverageExclude = buildOptions.codeCoverageExclude;
const exclude: (string | RegExp)[] = [
Expand All @@ -39,7 +38,7 @@ export function getTestConfig(

extraRules.push({
test: /\.(jsx?|tsx?)$/,
loader: require.resolve('istanbul-instrumenter-loader'),
loader: require.resolve('coverage-istanbul-loader'),
options: { esModules: true },
enforce: 'post',
exclude,
Expand Down
Loading

0 comments on commit 653be11

Please sign in to comment.