Skip to main content

Find entry points

Use:

rev-dep entry-points

An entry point here is any file that no other file in the graph imports - a likely root of the application.

This helps you discover candidates before writing prodEntryPoints and devEntryPoints in config.

Output modes​

rev-dep entry-points --count # just the number of entry points
rev-dep entry-points --print-deps-count # each entry point with its reachable file count

Filtering​

--graph-exclude removes files from the dependency graph before roots are computed (it changes reachability).

--result-include / --result-exclude only filter the printed list (they do not change the graph).

rev-dep entry-points --result-include 'src/**'
rev-dep entry-points --result-exclude '**/*.test.ts'
rev-dep entry-points --graph-exclude '**/*.stories.tsx'
rev-dep entry-points --process-ignored-files 'dist/**/*.generated.ts'

Use --ignore-type-imports to treat type-only imports as non-references, which can surface type-only files as roots.