Vite 5.1.x does not watch on vite build
with outDir: ''
#15951
Labels
p3-minor-bug
An edge case that only affects very specific usage (priority)
regression
The issue only appears after a new release
Describe the bug
When using vite for building like
vite --mode development build --watch
, vite terminates (no failure) after building the files.So it does not watch anymore for file changes.
I tested this with different vite versions:
The problem seems to only appear when setting
outDir: ''
which is required for us as the folder structure of our projects is like:/src
(input files)/js
(output files)/css
(output css files)/img
(output images files)Reproduction
https://stackblitz.com/edit/vitejs-vite-z4xoqc?file=vite.config.js
Steps to reproduce
Run
npm i && npm run watch
System Info
System: OS: Linux 6.7 openSUSE Tumbleweed 20240207 CPU: (12) x64 AMD Ryzen 5 5500U with Radeon Graphics Memory: 2.28 GB / 14.98 GB Container: Yes Shell: 5.9 - /bin/zsh Binaries: Node: 20.10.0 - /usr/bin/node Yarn: 1.22.21 - /usr/bin/yarn npm: 10.2.3 - /usr/bin/npm Browsers: Chromium: 120.0.6099.224 npmPackages: vite: ^5.1.3 => 5.1.3
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: