I'm not aware of a functionnality doing that.
You should then care about what you put in the project.
If you want Godot to ignore some folders, you can put an empty
.gdignore file into them, and Godot will not include them on export.
2020/04/07 Late edit: I'm actually not sure about the latter. It may not import those files, but I haven't checked if those files also don't end up in the exported game...