Npm modules on server only and pick which ones in Cordova


We’re trying to use AWS SDK (S3Client) but it makes the client grow by 800kb (and it makes the app not load on old iPhones).

So 2 questions:

1-How can we install the npm package so it goes into the server package only (and not the client/cordova)
2-How can I check what gets included in the Cordova package (and client as well)

Best regards,