Skip to content

Instantly share code, notes, and snippets.

@tomyam1
Created August 20, 2017 15:42
Show Gist options
  • Save tomyam1/7dedffdf0d04e95efe9f0ce44705db1e to your computer and use it in GitHub Desktop.
Save tomyam1/7dedffdf0d04e95efe9f0ce44705db1e to your computer and use it in GitHub Desktop.
Update Serverless Package

Update includes in serverless.yml

Determine which modules are needed to be included:

On Windows with cygwin:

npm ls --production | grep -i '\-\-' | sed 's/.*-- \(.*\)@.*/- node_modules\\/\1\\/**/g'

You'll get an output like

- node_modules/XXX/**
- node_modules/YYY/**
- node_modules/ZZZ/**

Put it instead of the node_modules includes in package.include in serverless.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment