Back to all Bounties
Earn 7,200 ($72.00)
due 2 years ago
Canceled
Custom Cypress Preprocessor using Angular's esbuild bundler
guzmanoj
Details
Applications
3
Discussion
Bounty Description
Problem Description
Recently, the Angular team released a new experimental esbuild-based bundler for Angular apps (https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts)
On the other hand, we have Cypress preprocessors (https://docs.cypress.io/api/plugins/preprocessors-api) the default one uses webpack under the hood but there are also a couple of them which also uses esbuild:
- https://github.com/sod/cypress-esbuild-preprocessor
- https://github.com/bahmutov/cypress-esbuild-preprocessor
The issue with those is that code imported from Angular in the Cypress spec files is not compiled correctly. That made me wonder, "what if we can have a Cypress preprocessor that uses Angular's new esbuild bundler instead of direclty using esbuild?" My guess is that this preprocessor could easily compile the Cypress spec. files correctly.
The requirements are: - Build an esbuild Cypress preprocessor, using one of the already existing ones as foundation (preferably the one from bahmutov) which instead of using esbuild directly, uses Angular's esbuild implementation.
Acceptance Criteria
- Repository under control of Altack organization
- Borrows the ideas from existing Cypress esbuild preprocessors
- Uses Angular esbuild package under the hood (instead of "raw" esbuild)
- Implemented preprocessor shall be able to properly process .spec.ts making it possible for Cypress to run the test.
- Implemented preprocessor shall play nice with imported code from Angular in a Nx Monorepo context (e.g. imported libraries)