Add npm module pruning and deduping

This is to reduce the overall file size of `node_modules` in npm projects.