-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Expand file tree
/
Copy pathjit-prod.ts
More file actions
22 lines (18 loc) · 852 Bytes
/
jit-prod.ts
File metadata and controls
22 lines (18 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { getGlobalVariable } from '../../utils/env';
import { updateJsonFile } from '../../utils/project';
import { executeBrowserTest } from '../../utils/puppeteer';
export default async function () {
// Make prod use JIT.
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;
}
});
// Test it works
await executeBrowserTest({ configuration: 'production' });
}