JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21097
  • Score
    100M100P100Q145784F
  • License MIT

A Serverless plugin that reduces your packaged function size

Package Exports

  • serverless-plugin-include-dependencies

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-plugin-include-dependencies) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

serverless-plugin-include-dependencies

This is a Serverless plugin that should make your deployed functions smaller.

It does this by enabling you to add your node_modules folder to the exclude list, then it individually adds each actual file that your handler depends on.

Usage Example

serverless.yml

service: sample

package:
  exclude:
    - node_modules/** # add this yourself

plugins:
  - serverless-plugin-include-dependencies

functions:
  foo:
    handler: src/handler/foo.handler
  bar:
    handler: src/handler/bar.handler

For even smaller function packages, you can also set:

package:
  individually: true