Skip to content

Commit 653be11

Browse files
alan-agius4mgechev
authored andcommitted
fix(@angular-devkit/build-angular): replace istanbul-instrumenter-loader with coverage-istanbul-loader
Fixes #16576 and fixes #7117
1 parent 4b17667 commit 653be11

File tree

3 files changed

+49
-160
lines changed

3 files changed

+49
-160
lines changed

packages/angular_devkit/build_angular/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
"caniuse-lite": "1.0.30001019",
2424
"circular-dependency-plugin": "5.2.0",
2525
"clean-css": "4.2.1",
26+
"coverage-istanbul-loader": "2.0.3",
2627
"copy-webpack-plugin": "5.1.1",
2728
"core-js": "3.6.2",
2829
"file-loader": "5.0.2",
2930
"find-cache-dir": "3.2.0",
3031
"glob": "7.1.6",
31-
"istanbul-instrumenter-loader": "3.0.1",
3232
"jest-worker": "24.9.0",
3333
"karma-source-map-support": "1.4.0",
3434
"less": "3.10.3",

packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export function getTestConfig(
2020
const extraRules: webpack.Rule[] = [];
2121
const extraPlugins: webpack.Plugin[] = [];
2222

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

4039
extraRules.push({
4140
test: /\.(jsx?|tsx?)$/,
42-
loader: require.resolve('istanbul-instrumenter-loader'),
41+
loader: require.resolve('coverage-istanbul-loader'),
4342
options: { esModules: true },
4443
enforce: 'post',
4544
exclude,

0 commit comments

Comments
 (0)