Time Machine
Keep node_modules and build folders out of backups, and free the space snapshots hold.
Raqun Commander's Time Machine module can keep dev folders such as node_modules, build output and virtual environments out of your backups. Its Exclusions page offers the ones it finds in the folders you watch, and excludes one only when you press Exclude. The same module lists the local snapshots that hold space on your disk and deletes the ones you choose.
Good for developers and anyone who has outgrown Finder.

Dev folders out of backups
The Exclusions page of the Time Machine module looks in the folders you watch and offers the dev folders it finds, such as node_modules, build folders and virtual environments, to keep out of your backups. Each folder shows its size, and the first line adds up what is excluded and the space that leaves out.
Never by name alone
A name alone is never enough: node_modules counts next to a package.json, target next to a Cargo.toml or pom.xml, a virtual environment by the pyvenv.cfg inside it, and a CMake build tree only when its CMakeCache.txt was made in that very folder. A project itself, a link and the inside of a node_modules are never offered, and dist and vendor are off at first, as they are often committed; each kind can be switched on or off.
Excluded when you say so
Nothing is excluded until you press Exclude on a folder, or Exclude All New for every new one; each folder is checked again at that moment, the exclusion is read back, and one that could not be set is in the Problems window with the reason. Nothing here deletes anything, and Include Again takes an exclusion back and remembers the folder as kept, so it is not offered again.
Watched folders
The first of DEV, Developer, Code, Projects and src in your home folder that exists is watched until you change it; the ⋯ menu adds a folder, as does dropping one from a pane on the list, and stops watching one. A folder is looked at when the module is first shown and again, no more than once in 20 seconds, when something new appears in it.
Made again, offered again
An exclusion lives on the folder and goes with it when it moves, so a folder that is deleted and made again, as by npm ci, is new again and is offered again instead of being excluded without asking. Whether a folder is excluded is Time Machine's own answer, so a folder that System Settings already leaves out is not counted as new.
Left-out items in the panes
An item that Time Machine leaves out has a small clock-with-a-cross icon after its name in the list, icons and columns. Exclude from Time Machine and Include in Time Machine are in the right-click menu for any files or folders you choose, and what you may not change is offered as administrator.
Local snapshots, with care
Time Machine keeps local snapshots on your disk, about one an hour, and they can hold space that the Finder counts as purgeable; the module lists one row per date, newest first. Delete… and Delete All… ask first, naming the snapshots, and delete only those that were listed and chosen, then look again and report one that is still there; the backups on the backup disk are never touched.
Freed space, honestly
macOS gives no size per snapshot, so Raqun Commander shows the space of the disk before and after a delete, as Freed with the amount. The snapshot marked reference holds no data of its own, so deleting it frees almost nothing and the next backup takes longer, and the question says so.
