devkit
devkit copied to clipboard
Cannot run component tests when project uses Webpack 5
Please find the below repository with working example of the failed Angular component test.
I have Nx set up with project.json files for each project (as opposed to the global angular.json file). We are also leveraging Webpack 5, and this appears to cause an issue when firing up the component test.
Steps to reproduce:
- Clone the following repository: https://github.com/kerry-afs/cypress-component
- Run
npm install
to install dependencies - Execute
ng run web-e2e:ct
- You will notice the command begin to execute, and the Cypress runner icon appear. However, the runner will not fully load and the component tests will not execute.
Environment: Nx: 12.10.0 Cypress: 8.5.1 Angular: 12.2.0 OS: macOS Big Sur 11.6
It's weird since we already use webpack 5 within the repository without any troubles. I'm gonna check your reproduction asap, thanks for the report.
Running into this issue as well. Runs fine with watch mode and clicking a test. Just need the headless mode for CI.