Package Exports
- smaller-modules
- smaller-modules/dist/index.js
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 (smaller-modules) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
smaller-modules
Shrink node_modules for deployment
Introduction

Are you having problems getting node_modules down to a reasonable size?
An error occurred (RequestEntityTooLargeException) when calling the UpdateFunctionCode operation: Request must be smaller than 69905067 bytes for the UpdateFunctionCode operationDo you hit size limits, even when creating separate layers to contain dependencies?
An error occurred (InvalidParameterValueException) when calling the UpdateFunctionCode operation: Unzipped size must be smaller than 262144000 bytesHere's a utility that might help.
Quickstart
Zip up node_modules for Lambda
smaller-modules --zip --file dist/handler.jsCopy dependencies of compiled output to a new directory
smaller-modules --copy --directory dist --output-subdirectory smaller_modulesList dependencies of a .js file
smaller-modules --list --file dist/index.js --output-path dependencies.txtor print it to the command line
smaller-modules --list --file dist/index.jsUsage
Zip up node_modules for Lambda (in long-hand)
smaller-modules --zip --file dist/index.js --output-subdirectory nodejs --output-path node_modules.zipUse with packages in a mono-repository
# Run from packages/<package-name>
smaller-modules --list --file dist/index.js --base "../.."