Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite 5.1.x does not watch on vite build with outDir: '' #15951

Closed
7 tasks done
susnux opened this issue Feb 18, 2024 · 1 comment · Fixed by #15979
Closed
7 tasks done

Vite 5.1.x does not watch on vite build with outDir: '' #15951

susnux opened this issue Feb 18, 2024 · 1 comment · Fixed by #15979
Labels
p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release

Comments

@susnux
Copy link
Contributor

susnux commented Feb 18, 2024

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:

  • 5.0.12 was the last good one ✅
  • 5.1.{0,1,2} all three are broken ❌

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

Copy link

stackblitz bot commented Feb 18, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@sapphi-red sapphi-red added p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release labels Feb 19, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants