egoist / egoist/tsup

--watch doesnt work in docker container

Open
#673 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

From what I can see `usePolling` fixes the issue when mounting a dev directory into a container while using --watch.

I tried replacing `tsup --watch` with `nodemon -L` and it resolved the issue confirming polling allows it to work.

https://github.com/remy/nodemon#application-isnt-restarting

https://github.com/egoist/tsup/blob/504031796c01db50cb3edc790a28de462a83a1d2/src/index.ts#L294-L297

Contributor guide

Open the contributing guide

Research direction

Start in src/index.ts around lines 294-297, where watch behavior and usePolling are referenced. Reproduce the issue with a mounted development directory inside Docker, compare tsup --watch with polling enabled, and verify that changes trigger rebuilds without requiring nodemon -L.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript
Domain
build-system, devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.