Skip to content

[5.0 Beta 10+] file change Watch no longer detect changes in workspace since Rollup 4 #14927

@ghiscoding

Description

@ghiscoding

Describe the bug

I have 2 monorepo workspace projects which I tried to upgrade to Vite 5.0 Beta 17, both projects are using pnpm workspace (with workspace:* protocol), prior to Beta 10 (which is the Rollup 4 upgrade) the watch worked correctly. However it regressed in Beta 10 and it stopped detecting file changed in the workspace. I tried many Beta versions to find out that the regression started with Beta 10 and higher which was the switch to Rollup 4.

I went back to Vite 4.5 for now (or I could also use Vite 5.0-beta.9 which works) because the watch still works correctly in my monorepo project with old version. Hopefully this gets fixed so I can upgrade back to 5.0 :)

Reproduction

https://github.com/ghiscoding/multiple-select-vanilla

Steps to reproduce

steps to install the monorepo

  1. git clone https://github.com/ghiscoding/multiple-select-vanilla
  2. upgrade to Vite 5 Beta 10 or higher in lib/package.json and demo/package.json
  3. pnpm install
  4. pnpm run dev
  5. make a change in any file from the lib/ package and it should do a full page reload in the browser (I use full page refresh because it's a monorepo structure)

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12800H
    Memory: 8.29 GB / 31.67 GB
  Binaries:
    Node: 18.18.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.10.2 - ~\AppData\Local\pnpm\pnpm.EXE
  Browsers:
    Edge: Spartan (44.19041.3570.0), Chromium (118.0.2088.76)
    Internet Explorer: 11.0.19041.3570

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Metadata

Assignees

Labels

p4-importantViolate documented behavior or significantly improves performance (priority)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions