Summary
After the Angular 19 update, the build system and e2e code coverage need attention. This issue tracks migrating from the legacy webpack-based builder to esbuild and restoring Cypress e2e code coverage.
Current Problems
- E2e coverage disabled:
CYPRESS_COVERAGE=false was added to CI because the production build has no Istanbul instrumentation, causing OOM crashes and Invalid string length errors in the coverage report afterAll hook.
- Legacy builder:
angular.json uses @angular-devkit/build-angular:browser (webpack). Angular 19+ defaults to the esbuild-based application builder.
- Dead dependencies:
istanbul-instrumenter-loader is referenced in cypress/coverage.webpack.js but not installed. ngx-build-plus is used only for the serve builder.
Tasks
1. Migrate to esbuild application builder
2. Fix e2e code coverage
3. Fix tree component tests after build migration
Context
- Angular 19
application builder uses esbuild + Vite dev server
- The webpack-based
browser builder is deprecated and will be removed in a future Angular version
ngx-build-plus and istanbul-instrumenter-loader do not support esbuild
Summary
After the Angular 19 update, the build system and e2e code coverage need attention. This issue tracks migrating from the legacy webpack-based builder to esbuild and restoring Cypress e2e code coverage.
Current Problems
CYPRESS_COVERAGE=falsewas added to CI because the production build has no Istanbul instrumentation, causing OOM crashes andInvalid string lengtherrors in the coverage reportafterAllhook.angular.jsonuses@angular-devkit/build-angular:browser(webpack). Angular 19+ defaults to the esbuild-basedapplicationbuilder.istanbul-instrumenter-loaderis referenced incypress/coverage.webpack.jsbut not installed.ngx-build-plusis used only for the serve builder.Tasks
1. Migrate to esbuild
applicationbuilder@angular-devkit/build-angular:browserto@angular-devkit/build-angular:applicationinangular.jsonmain→browser,outputPathstructure,polyfillsformat)ngx-build-plusdependency and custom webpack serve config2. Fix e2e code coverage
cypress/coverage.webpack.jsor replace with esbuild equivalentNODE_OPTIONS: --max-old-space-size=4096for the e2e CI stepCYPRESS_COVERAGE: falsefrombuild.ymlonce coverage workscombined.jsmerge script andnyc reportstill function correctly3. Fix tree component tests after build migration
Context
applicationbuilder uses esbuild + Vite dev serverbrowserbuilder is deprecated and will be removed in a future Angular versionngx-build-plusandistanbul-instrumenter-loaderdo not support esbuild