A Serverless Framework plugin that automatically bundles each Lambda function individually using Webpack. Version 1.5.1 is the latest stable release (last updated in 2018). It supports webpack 2.x and 3.x (peer dependency), and was designed to work with Serverless v1.18+. Key differentiators: zero configuration required, functions are packaged individually for minimal deployment size, uses an array of Webpack configs (one per function) for better tree-shaking, and supports sls package/deploy/deploy function commands. This plugin is distinct from the more popular serverless-webpack plugin (by elastic-coders) and is now essentially superseded by that and newer tools like serverless-bundle. No longer actively maintained; users should migrate to serverless-webpack or serverless-esbuild.
npm install serverless-plugin-webpackVerified import paths — ran on the pinned version, not inferred.
Shows minimal setup: install plugin and webpack 3, configure serverless.yml, create webpack.config.js, and deploy.
Do not specify entry or output in your webpack.config.js; the plugin will override them.
Upgrade to serverless-webpack (elastic-coders) which supports webpack 4+ and is actively maintained.
Ensure ES6 modules are used and configure sideEffects in package.json to avoid dead code elimination failures.
Upgrade Serverless to v1.18.0 or later, or use an older version of the plugin.
Review the generated .serverless directory to ensure correct files are included.
npm install webpack@3 --save-dev
npm install serverless-plugin-webpack --save-dev and ensure it's in serverless.yml plugins array.
Upgrade Serverless to >=1.18.0.
Update to v1.5.1 which fixes this bug.