Excluding certain patterns from syncing

OK, so I’ve researched this (just so you know I didn’t just blurp to the forum right away) and thought it would be an easy find, but turns out differently.

I sync a lot of project folders for software development. So I would like to exclude certain directories. Things like node_modules or vendor don’t need to be synced. Is there a way I can place a list of patterns, maybe even regex-based, that will be excluded from syncing?

Apart from it taking up space, I see a lot of sync errors coming from those directories.