I assume you mean exclude the node_modules
in the DSM node config??
I've previously asked the same, but not yet found an answer, and like you, I have to list each file or folder that I DO need which is a pain.
If you do find a solution please let me know, and I'll update my original topic - node-RED Backup Flow