Current Behavior
In a Playwright E2E project, the E2E target is generated as cacheable, but with the wrong inputs.
|
? ['default', '^{projectRoot}/tsconfig*.json', '^production'] |
It seems like defining ['default', '^{projectRoot}/tsconfig*.json', '^production'] causes the target not to depend on the actual ^production files. Instead, it only depends on '^{projectRoot}/tsconfig*.json' from the dependent projects, and that's it.
When you look at the task in nx graph, it seems ok:

But when you look at the actual file list, you see it only depends on the .tsconfig files without any the source files:

As a result, the E2E result is taken from cache even if the dependencies' code has changed.
Expected Behavior
The generated E2E project should depend on the actual files from ^production.
GitHub Repo
No response
Steps to Reproduce
- Create a Playwright E2E test project.
- Add an implicit dependency to another project.
- Run the E2E.
- Change a code file.
- Run the E2E again - the cache will be used.
Nx Report
❯ pnpm nx report
NX Report complete - copy this into the issue template
Node : 24.14.0
OS : darwin-arm64
Native Target : aarch64-macos
pnpm : 10.32.1
daemon : Available
nx : 22.6.1
@nx/js : 22.6.1
@nx/eslint : 22.6.1
@nx/workspace : 22.6.1
@nx/jest : 22.6.1
@nx/devkit : 22.6.1
@nx/eslint-plugin : 22.6.1
@nx/module-federation : 22.6.1
@nx/nest : 22.6.1
@nx/next : 22.6.1
@nx/node : 22.6.1
@nx/playwright : 22.6.1
@nx/plugin : 22.6.1
@nx/react : 22.6.1
@nx/rollup : 22.6.1
@nx/rspack : 22.6.1
@nx/vite : 22.6.1
@nx/vitest : 22.6.1
@nx/web : 22.6.1
@nx/webpack : 22.6.1
@nx/docker : 22.6.1
typescript : 5.9.3
---------------------------------------
Nx key licensed packages
Licensed to XXX.
@nx/s3-cache : 5.0.2
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/jest/plugin
@nx/webpack/plugin
@nx/rspack/plugin
@nx/next/plugin
@nx/js/typescript
@nxlv/python
@nx/playwright/plugin
@nx/js/typescript
---------------------------------------
Community plugins:
@nx-tools/nx-container : 7.2.1
@nx/s3-cache : 5.0.2
@nxlv/python : 22.1.1
---------------------------------------
Local workspace plugins:
@application/nx-plugin
---------------------------------------
Cache Usage: 15.03 MB / 92.64 GB
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
When I add the following in nx.json under targetDefaults, I can workaround it and the inputs are calculated correctly:
"e2e": {
"inputs": ["default", "^production"]
}
Current Behavior
In a Playwright E2E project, the E2E target is generated as
cacheable, but with the wrong inputs.nx/packages/playwright/src/plugins/plugin.ts
Line 200 in 3fa06c9
It seems like defining
['default', '^{projectRoot}/tsconfig*.json', '^production']causes the target not to depend on the actual^productionfiles. Instead, it only depends on '^{projectRoot}/tsconfig*.json' from the dependent projects, and that's it.When you look at the task in

nx graph, it seems ok:But when you look at the actual file list, you see it only depends on the

.tsconfigfiles without any the source files:As a result, the E2E result is taken from cache even if the dependencies' code has changed.
Expected Behavior
The generated E2E project should depend on the actual files from
^production.GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
When I add the following in
nx.jsonundertargetDefaults, I can workaround it and the inputs are calculated correctly: