From 2f2069dbaa70c3d4725923f1c3ccbf56b1f57576 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 17 Dec 2021 11:00:46 +0100 Subject: [PATCH] fix(@angular-devkit/build-angular): disable parsing `new URL` syntax When web-workers are enabled we allowing parsing `new URL` syntax which has the side-effect that Webpack will treat all assets as asset modules (https://webpack.js.org/guides/asset-modules/#url-assets). With this change we remove this inconsistency by disabling the `url` parsing which doesn't effect `new Worker(new URL(...))`. (cherry picked from commit a0784bd8cb64bd719ed499f97603522fbc9db02d) --- .../src/webpack/configs/common.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/common.ts b/packages/angular_devkit/build_angular/src/webpack/configs/common.ts index b82b1eb9930b..e19db3fb4c27 100644 --- a/packages/angular_devkit/build_angular/src/webpack/configs/common.ts +++ b/packages/angular_devkit/build_angular/src/webpack/configs/common.ts @@ -357,16 +357,14 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise