I have an ngular project that was in angular 11 and we started updating it to angular 16, this project has 3 libraries that continued very fast to build, and when I use this libraries in the angular application, the build is extremely slow, taking hours to complete
I updated the tsconfig to this
{
"compileOnSave": false,
"compilerOptions": {
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"alwaysStrict": true,
"noImplicitAny": true,
"noPropertyAccessFromIndexSignature": false,
"noUnusedLocals": true,
"strictNullChecks": false,
"strictPropertyInitialization": false,
"exactOptionalPropertyTypes": false,
"noImplicitThis": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"useUnknownInCatchVariables": true,
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"skipLibCheck": true,
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"allowSyntheticDefaultImports": true,
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
"lib": [ "ES2022", "dom" ],
"paths": {
"local/*": [ "./src/app/*" ]
}
},
"angularCompilerOptions": {
"compilationMode": "full",
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableI18nLegacyMessageIdFormat": false,
"strictInputAccessModifiers": true,
"strictTemplates": true,
"enableIvy": true
}
}
I would like to execute an command and detect what is slow on this build
I tried the ng build --verbose but the result wasn't helpfull
this is the result after hours
√ Browser application bundle generation complete. [webpack.cache.PackFileCacheStrategy] Pack got invalid because of write to: ResolverCachePlugin|normal|default|dependencyType=|esm|path=|C:\ProjetosGIT\SA\NgSaClient|request=|C:\ProjetosGIT\SA\NgSa\src\styles.scss?ngGlobalStyle
Is there any other configuration to show me what files are taking me the time to compile?