Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): don't parse new Worker syntax w…
Browse files Browse the repository at this point in the history
…hen `webWorkerTsConfig` is not defined in karma builder

This is to retain version 11 behaviour.

Closes #21108

(cherry picked from commit 071c8d1)
  • Loading branch information
alan-agius4 authored and clydin committed Jun 11, 2021
1 parent 3a0c62c commit 427c422
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -16,7 +16,7 @@ export function getTestConfig(
wco: WebpackConfigOptions<WebpackTestOptions>,
): webpack.Configuration {
const {
buildOptions: { codeCoverage, codeCoverageExclude, main, sourceMap },
buildOptions: { codeCoverage, codeCoverageExclude, main, sourceMap, webWorkerTsConfig },
root,
sourceRoot,
} = wco;
Expand Down Expand Up @@ -60,6 +60,15 @@ export function getTestConfig(
},
module: {
rules: extraRules,
parser:
webWorkerTsConfig === undefined
? undefined
: {
javascript: {
worker: false,
url: false,
},
},
},
plugins: extraPlugins,
optimization: {
Expand Down

0 comments on commit 427c422

Please sign in to comment.