From bd118b8dee509009872b1008afcde34c5438e82b Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 8 Apr 2025 14:06:46 -0400 Subject: [PATCH] test: remove bundle budget from JIT production E2E test Applications built with JIT will be significantly larger due to both the need to bundle the Angular compiler and the extra metadata that must be retained for each Angular construct. The initial bundle budget in new applications is specified for an AOT application and may not pass if used with JIT. --- tests/legacy-cli/e2e/tests/build/jit-prod.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/legacy-cli/e2e/tests/build/jit-prod.ts b/tests/legacy-cli/e2e/tests/build/jit-prod.ts index 7d6e6e767736..2042b0a8c93d 100644 --- a/tests/legacy-cli/e2e/tests/build/jit-prod.ts +++ b/tests/legacy-cli/e2e/tests/build/jit-prod.ts @@ -7,7 +7,12 @@ export default async function () { await updateJsonFile('angular.json', (configJson) => { const appArchitect = configJson.projects['test-project'].architect; appArchitect.build.configurations['production'].aot = false; + + // JIT applications have significantly larger sizes + appArchitect.build.configurations['production'].budgets = []; + if (!getGlobalVariable('argv')['esbuild']) { + // The build optimizer option does not exist with the application build system appArchitect.build.configurations['production'].buildOptimizer = false; } });