Shouldn't this be handled entirely by npm? If these files are unnecessary why do they get downloaded in the first place?
Is it too hard to meaningfully separate these parts of a package, or is it more of a philosophical issue?
Furthermore, it would be quite irritating if it started assuming specific file extensions are forbidden instead of using the explicit list provided by the author.