{"library":"serverless-plugin-webpack","title":"serverless-plugin-webpack","description":"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.","language":"javascript","status":"abandoned","last_verified":"Sat Apr 25","install":{"commands":["npm install serverless-plugin-webpack"],"cli":null},"imports":["// Add to serverless.yml plugins array\nplugins:\n  - serverless-plugin-webpack"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Install\nnpm install serverless-plugin-webpack webpack@3 --save-dev\n\n// serverless.yml\nservice: my-service\nplugins:\n  - serverless-plugin-webpack\nprovider:\n  name: aws\n  runtime: nodejs8.10\nfunctions:\n  hello:\n    handler: handler.hello\n\n// webpack.config.js\nmodule.exports = {\n  target: 'node',\n  externals: [/aws-sdk/],\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        loader: 'babel-loader',\n        query: {\n          presets: [\n            ['env', { target: { node: '8.10' }, useBuiltIns: true, modules: false, loose: true }],\n            'stage-0'\n          ]\n        }\n      }\n    ]\n  }\n};\n\n// Deploy\nsls deploy","lang":"javascript","description":"Shows minimal setup: install plugin and webpack 3, configure serverless.yml, create webpack.config.js, and deploy.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}