From 0498768c54de225a40c28fdf27bb1fc43959ba20 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 8 Sep 2021 13:14:56 +0200 Subject: [PATCH] fix(@angular-devkit/build-angular): disable dev-server response compression Compression isn't particular useful during development, also in version 13 we disable this completely due to timeouts issues which it causes. This backports this change which also addresses another issues as described here #21720 Closes #21720 --- .../build_angular/src/webpack/configs/dev-server.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/dev-server.ts b/packages/angular_devkit/build_angular/src/webpack/configs/dev-server.ts index 8523f72ad860..9b57696783d6 100644 --- a/packages/angular_devkit/build_angular/src/webpack/configs/dev-server.ts +++ b/packages/angular_devkit/build_angular/src/webpack/configs/dev-server.ts @@ -43,9 +43,8 @@ export function getDevServerConfig( } = wco; const servePath = buildServePath(wco.buildOptions, logger); - const { styles: stylesOptimization, scripts: scriptsOptimization } = normalizeOptimization( - optimization, - ); + const { styles: stylesOptimization, scripts: scriptsOptimization } = + normalizeOptimization(optimization); const extraPlugins = []; @@ -109,7 +108,7 @@ export function getDevServerConfig( }, sockPath: posix.join(servePath, 'sockjs-node'), stats: false, - compress: stylesOptimization.minify || scriptsOptimization, + compress: false, watchOptions: getWatchOptions(poll), https: getSslConfig(root, wco.buildOptions), overlay: {