Overview
Therev-dep files command recursively finds and lists all files that are required by the specified entry point. This helps you understand the complete dependency tree for a given file.
Usage
Flags
List of conditions for package.json imports resolution (e.g. node, imports, default)
Only display the count of files in the dependency tree
Working directory for the command
Entry point file to analyze
Enable resolution of imports from monorepo workspace packages. Pass without value to follow all, or pass package names
Exclude type imports from the analysis
Path to package.json
Path to tsconfig.json
Show warnings and verbose output
Help for files command
Examples
List all files in entry point’s dependency tree
Count files in dependency tree
Analyze with type imports excluded
Analyze with monorepo support
Use custom TypeScript config
Use Cases
Understanding dependency scope
Understanding dependency scope
Use this command to see all files that would be included when bundling or analyzing a specific entry point.
Impact analysis
Impact analysis
Before making changes to shared utilities, check which entry points depend on them.
Code splitting optimization
Code splitting optimization
Identify overlapping dependencies between entry points to optimize bundle sizes.
Related Commands
- entry-points - Discover all entry points in the project
- resolve - Trace the dependency path between specific files
- imported-by - Find files that import a specific file
