nx
nx copied to clipboard
vitest with Project Crystal does not work with watch flag
Current Behavior
When Project Crystal is used with vitest, the command that vitest generates uses vitest run
which prevents entering watch mode.
Expected Behavior
Watch mode should work when passed on the command line.
GitHub Repo
No response
Steps to Reproduce
- Run npx nx test app --watch
- Note that a single run is performed instead of entering watch mode.
Nx Report
NX Report complete - copy this into the issue template
Node : 20.12.2
OS : win32-x64
npm : 10.5.2
nx : 18.3.4
@nx/js : 18.3.4
@nx/jest : 18.3.4
@nx/linter : 18.3.4
@nx/eslint : 18.3.4
@nx/workspace : 18.3.4
@nx/devkit : 18.3.4
@nx/esbuild : 18.3.4
@nx/eslint-plugin : 18.3.4
@nx/node : 18.3.4
@nx/plugin : 18.3.4
@nrwl/tao : 18.3.4
@nx/vite : 18.3.4
typescript : 5.4.5
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/vite/plugin
---------------------------------------
Failure Logs
No response
Package Manager Version
10.5.2
Operating System
- [ ] macOS
- [ ] Linux
- [X] Windows
- [ ] Other (Please specify)
Additional Information
Issue appears to be here: https://github.com/nrwl/nx/blob/7303b7a7fbf57157ce4b9a94702510e173fd8642/packages/vite/src/plugins/plugin.ts#L212
Since this is using run
, this implies --watch=false
and cannot be overridden.