vite icon indicating copy to clipboard operation
vite copied to clipboard

Inlined workers aren't being rebuilt while using `lib` mode and `build --watch`

Open ivancuric opened this issue 3 years ago • 0 comments

Describe the bug

When using vite build --watch and lib mode, workers which are imported and inlined aren't being rebuilt.

In the reproduction linked, you can run npm run watch-lib in one terminal and npm run dev in the other and modify inlineWorker.ts. The lib will rebuild, and the dev server will trigger a reload, but the inlined worker will remain the same.

Possibly related to https://github.com/vitejs/vite/issues/3566 and https://github.com/vitejs/vite/issues/3909

Reproduction

https://stackblitz.com/edit/vitejs-vite-2cucaj?file=worker/inlineWorker.ts

System Info

System:
    OS: macOS 12.3.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 69.00 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.15.0 - ~/.volta/tools/image/node/16.15.0/bin/node
    npm: 8.10.0 - ~/.volta/tools/image/npm/8.10.0/bin/npm
  Browsers:
    Chrome: 101.0.4951.64
    Firefox: 97.0.1
    Safari: 15.4

Used Package Manager

npm

Logs

No response

Validations

ivancuric avatar May 13 '22 14:05 ivancuric