Cleaning up package node_modules folder

The current package plugin grabs all the files from the node_modules directory. Does anyone have a way to just get the required files? I was looking at something like webpack to do this.

Any help would be appreciated.

You can take a look at the recently released Serverless Webpack plugin: https://github.com/elastic-coders/serverless-webpack

We’re probably going to move it into our Community plugins repo at some point: https://github.com/serverless/community-plugins

Thanks. I am using this now to reduce my deployment package from 3.6mb to 380kb :slight_smile: Lots better.