From d6c181c99770c6a7757c17347c37c85b361bf586 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Tue, 22 Mar 2022 10:00:07 +0100 Subject: [PATCH] Define Angular CLI globals to support tree shaking (#1541) --- webpack.config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index a1ae0394d4..8c6a51a8a2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -250,6 +250,13 @@ const webpackConfig = { new TerserPlugin({ terserOptions: { safari10: true, + // Replicate Angular CLI behaviour + compress: { + global_defs: { + ngDevMode: false, + ngI18nClosureMode: false, + }, + }, }, }), ],