Inspect dependency tree
Use:
rev-dep files --entry-point src/index.ts
This lists every file reachable from the chosen entry point, including the entry point itself. It is useful for understanding bundle scope or investigating why a file is pulled in.
--entry-point is required and takes a single file.
Useful flags​
rev-dep files --entry-point src/index.ts --count
rev-dep files --entry-point src/index.ts --ignore-type-imports
rev-dep files --entry-point apps/web/src/index.ts --follow-monorepo-packages
rev-dep files --entry-point src/index.ts --process-ignored-files 'dist/**/*.generated.ts'
--countprints only the number of reachable files.--ignore-type-importsexcludes files only reached through type-only imports.--follow-monorepo-packagesuse to surface files imported from other packages in monorepo
To go the other direction - find who pulls in a file - use imported-by or resolve.