This PR updates the `@nx/detox:app` generator to match the new TS solution setup. The `@nx/cypress:configuration` and `@nx/cypress:configuration` generators are also updated so that they can be run on existing projects and generator the correct tsconfig files. The Playwright/Cypress example can be seen as follows: ```shell # Skip e2e nx g @nx/react:app apps/demo --bundler vite --e2eTestRunner none # now configure e2e nx g @nx/playwright --project demo ``` Now if you add this line to `apps/demo/e2e/example.spec.ts`: ``` const x: number = 'a'; ``` And run `nx typecheck demo`, it will pass. This happens because the `e2e/**/*.ts` pattern is missing. Thus, we need to ensure that a `tsconfig.e2e.json` project is added for the Playwright spec files. Same thing with Cypress. The Detox generator does not support adding configuration to existing project, so we don't quite get the same problem. The fix for Detox is just to make sure the tsconfig content is not following the old (integrated) version, but the updated TS solution version. ## Current Behavior Detox TS setup is incorrect. Running Cypress and Playwright configuration generator on existing projects generate invalid setup, such that spec files are not typechecked. ## Expected Behavior E2E generators should all generate correct TS setup. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
{{links}}
Nx: Smart Monorepos · Fast CI
Nx is a build system, optimized for monorepos, with plugins for popular frameworks and tools and advanced CI capabilities including caching and distribution.
This package is a Cypress plugin for Nx.
{{content}}