Open paulcjy opened 4 weeks ago
it might be, due to recent upgrade of Chokidar to v4 in PR #1211. Perhaps the new glob
(from tinyglobby) should add the { dot: true }
option? cc @SuperchupuDev
could be, would have to check how chokidar v3 did globbing
I'm having the same issue. I had version 8.3.5
installed in a project which was running Express.
When I run the project I do not see the typical watch mode message, which looks something like:
CLI Watching for changes in "."
CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
The project does not reload on changes.
However! If I stop my Express server from running:
// stop express server from running
// server.listen(8080, () => console.log('Server is live'))
Removing this line of code and restarting my app, I see the expected watch mode message and my project does reload on changes.
Downgrading to 8.3.0
works whether my Express server is running or not. So that is what I've done for now.
Hope this extra bit of information helps!
I'm encountering the same issue, but it seems the onSuccess
CLI option is what's causing the problem.
When I run npx tsup ./src/main.ts --watch
from the terminal, I get the line CLI Watching for changes in "."
and a compile event occurs on every save. Whereas, if I run npx tsup ./src/main.ts --watch --onsuccess="node dist/main.js"
, it doesn't have the watching changes line and does nothing further on save.
I've reviewed the source and I think I've found the cause. I added a bunch of log statements to the JS files in the node_modules dist folder and I found that there's a point where the code no longer progresses.
I'm pretty sure it's related to this line: https://github.com/egoist/tsup/blame/cd03e1e00ec2bd6676ae1837cbc7e618ab6a2362/src/index.ts#L357
Which, ultimately was updated with this PR which lines up with the timeframe for the last 2 versions not working correctly: https://github.com/egoist/tsup/commit/4dd5bfeb2f1973242e2f9700a3061aee9d8af988
If I comment this line out in my dist folder (which, unfortunately, is elsewhere, because it's been transpiled), watch runs as normal.
I will provide a PR soon as a band-aid solution. Even if it's NOT the solution, it would behoove us to figure out what that goal is for the await statement, considering it breaks the functionality as listed in the documentation
It works until v8.3.0 but doesn't work on next releases v8.3.4 and v8.3.5.
v.8.3.0
There are two lines at the bottom and watch mode works well.
v8.3.4 / v8.3.5
No messages for watch mode and watch mode doesn't work as well.
Upvote & Fund