Description
Current behavior
Angular 19 doesn't use devkit (webpack) anymore by default. In Cypress 14 I get this error:
Error: Could not resolve "@angular-devkit/build-angular/src/utils/webpack-browser-config.js". Do you have "@angular-devkit/build-angular" and "@angular-devkit/core" installed?
at C:\Users\jcomp\AppData\Local\Cypress\Cache\14.0.0\Cypress\resources\app\node_modules\@packages\server\node_modules\@cypress\webpack-dev-server\dist\helpers\angularHandler.js:106:19
at Array.map (<anonymous>)
at getAngularCliModules (C:\Users\jcomp\AppData\Local\Cypress\Cache\14.0.0\Cypress\resources\app\node_modules\@packages\server\node_modules\@cypress\webpack-dev-server\dist\helpers\angularHandler.js:100:151)
at async getAngularCliWebpackConfig (C:\Users\jcomp\AppData\Local\Cypress\Cache\14.0.0\Cypress\resources\app\node_modules\@packages\server\node_modules\@cypress\webpack-dev-server\dist\helpers\angularHandler.js:159:101)
at async angularHandler (C:\Users\jcomp\AppData\Local\Cypress\Cache\14.0.0\Cypress\resources\app\node_modules\@packages\server\node_modules\@cypress\webpack-dev-server\dist\helpers\angularHandler.js:205:27)
at async getPreset (C:\Users\jcomp\AppData\Local\Cypress\Cache\14.0.0\Cypress\resources\app\node_modules\@packages\server\node_modules\@cypress\webpack-dev-server\dist\devServer.js:62:20)
at async Function.devServer.create (C:\Users\jcomp\AppData\Local\Cypress\Cache\14.0.0\Cypress\resources\app\node_modules\@packages\server\node_modules\@cypress\webpack-dev-server\dist\devServer.js:79:61)
at async C:\Users\jcomp\AppData\Local\Cypress\Cache\14.0.0\Cypress\resources\app\node_modules\@packages\server\node_modules\@cypress\webpack-dev-server\dist\devServer.js:22:24
because we don't use the webpack builder anymore, we use purely the @angular/build:application builder.
Also the schematics of the angular upgrade from 18 to 19 will remove the npm package: "@angular-devkit/build-angular" and adds the package:
"@angular/build"
Is cypress able to run with the new builder and not webpack?
Desired behavior
cypress should run with the new application builder (esbuild) instead of webpack which is not used anymore by angular itself
Test code to reproduce
here is our component test:
https://github.com/Servoy/servoy-extra-components
here is the angular.json that has the applicaiton builder (of the dummy project used by cypress)
https://github.com/Servoy/servoy-extra-components/blob/master/angular.json#L37
Cypress Version
14
Node version
v22.11.0
Operating System
windows 11
Debug Logs
Other
No response