-
-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Description
it looks like tsup doesn't actually watch files that are only imported for their types
this is a huge DX issue when dealing with tRPC, because in order to avoid including a bunch of server-only dependencies in my client package that I'm building, I have to reference & export only the type of my routers, but not the actual router itself
here's a minimal reproduction repro along w a video demonstrating the issue: https://github.com/rayzr522/tsup-watch-type-imports-bug
WindowsTerminal_PDjZjU0aeK.mp4
npm -v
# 8.19.3
pnpm -v
# 7.26.3
tsup -v
# tsup/6.6.0 linux-x64 node-v18.13.0
EDIT: I just realized the bug wasn't exactly what I thought it was, and am having a hard time reproducing the issue in my MVP repo. I will post an update here once I've figured it out, so sorry for the confusion!
Metadata
Metadata
Assignees
Labels
No labels