Vite configurations are missing build.emptyOutDir property resulting in output directory not being cleaned, and warning
MilanKovacic opened this issue · 0 comments
MilanKovacic commented
Current Behavior
When building with scaffolded vite.config files, the following error occurs:
(!) outDir [omitted] is not inside project root and will not be emptied.
Use --emptyOutDir to override.
Expected Behavior
Generated vite.config files contain the emptyOutDir property:
build: {
...
emptyOutDir: true,
},
GitHub Repo
No response
Steps to Reproduce
- Generate for example, a new React application (@nx/react) using Vite as bundler
- Build the project
- Warning is presented, and output directory is not cleaned
Nx Report
Node : 20.13.0
OS : darwin-arm64
npm : 10.5.2
nx (global) : 18.3.4
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/eslint-plugin : 18.3.4
@nx/nest : 18.3.4
@nx/node : 18.3.4
@nx/playwright : 18.3.4
@nx/react : 18.3.4
@nrwl/tao : 18.3.4
@nx/vite : 18.3.4
@nx/web : 18.3.4
@nx/webpack : 18.3.4
typescript : 5.4.5
---------------------------------------
Registered Plugins:
@nx/vite/plugin
@nx/eslint/plugin
@nx/playwright/plugin
@nx/webpack/plugin
@nx/jest/plugin
Failure Logs
No response
Package Manager Version
No response
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
No response