Skip to content

Commit 427c422

Browse files
alan-agius4clydin
authored andcommitted
fix(@angular-devkit/build-angular): don't parse new Worker syntax when webWorkerTsConfig is not defined in karma builder
This is to retain version 11 behaviour. Closes #21108 (cherry picked from commit 071c8d1)
1 parent 3a0c62c commit 427c422

File tree

1 file changed

+10
-1
lines changed
  • packages/angular_devkit/build_angular/src/webpack/configs

1 file changed

+10
-1
lines changed

packages/angular_devkit/build_angular/src/webpack/configs/test.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function getTestConfig(
1616
wco: WebpackConfigOptions<WebpackTestOptions>,
1717
): webpack.Configuration {
1818
const {
19-
buildOptions: { codeCoverage, codeCoverageExclude, main, sourceMap },
19+
buildOptions: { codeCoverage, codeCoverageExclude, main, sourceMap, webWorkerTsConfig },
2020
root,
2121
sourceRoot,
2222
} = wco;
@@ -60,6 +60,15 @@ export function getTestConfig(
6060
},
6161
module: {
6262
rules: extraRules,
63+
parser:
64+
webWorkerTsConfig === undefined
65+
? undefined
66+
: {
67+
javascript: {
68+
worker: false,
69+
url: false,
70+
},
71+
},
6372
},
6473
plugins: extraPlugins,
6574
optimization: {

0 commit comments

Comments
 (0)