
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
@jaridwade/serverless-rollup-plugin
Advanced tools
Serverless Rollup Plugin - reduces Lambda file size through via bundling and tree-shaking
Forked from serverless-optimizer-plugin this plugin uses Rollup to optimize your Serverless Node.js Functions on deployment.
Reducing the file size of your AWS Lambda Functions allows AWS to provision them more quickly, speeding up the response
time of your Lambdas. Smaller Lambda sizes also helps you develop faster because you can upload them faster.
This Severless Plugin is absolutely recommended for every project including Lambdas with Node.js.
Note: Requires Serverless v0.5.0.
npm install serverless-rollup-plugin rollup --save-dev
plugins array in your Serverless Project's s-project.json, like this:plugins: [
"serverless-rollup-plugin"
]
custom property of your s-project.json add a rollup property.{
"custom": {
"rollup": {
"config": "path/relative/to/project-path"
}
}
}
** You can optimize all your Node.js functions by configuring your s-project.json:
{
"custom": {
"rollup": {
"config": "path/relative/to/project-path",
"global": true
}
}
}
** Or only optimize certain functions by configuring their s-function.json:
{
"custom": {
"rollup": true
}
}
You can completely customize how your code is transformed and optimized by specifying your own rollup config. Heres a sample rollup.config.js:
Note: Remember to install any rollup plugins you plan to use.
var rollup = require('rollup');
var nodeResolve = require('rollup-plugin-node-resolve');
var commonjs = require('rollup-plugin-commonjs');
var inject = require('rollup-plugin-inject');
var babel = require('rollup-plugin-babel');
var uglify = require('rollup-plugin-uglify');
module.exports = {
// entry: provided by serverless
plugins: [
nodeResolve({
jsnext: true,
main: true,
extensions: [ '.js', '.jsx' ],
preferBuiltins: true
}),
commonjs(),
inject({
Promise: 'es6-promise'
}),
babel(),
uglify()
]
};
FAQs
Serverless Rollup Plugin - reduces Lambda file size through via bundling and tree-shaking
The npm package @jaridwade/serverless-rollup-plugin receives a total of 0 weekly downloads. As such, @jaridwade/serverless-rollup-plugin popularity was classified as not popular.
We found that @jaridwade/serverless-rollup-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.