New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

webpack-lambda-layer-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-lambda-layer-plugin

Webpack plugin to export used node_modules as a separate package for the lambda layer

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Webpack Lambda Layer Plugin

Efficiently Package Required Node Modules for Your Lambda Layer

npm version Dependency Status Blazing Fast
Main Programming Language Last Commit License Code Style: Prettier

Webpack Lambda Layer Plugin is a tool designed to simplify the process of packaging code libraries for your Lambda functions. The plugin works by bundling the necessary node dependencies as a separate package, which can then be utilized in your Lambda Layer, providing an efficient way to share code libraries with multiple Lambda Functions.

Simultaneously, these dependencies will get externalized from your Lambda Function bundles, leading to reduced bundle sizes and improved build and deployment times.

Installation

yarn

yarn add --dev webpack-lambda-layer-plugin

npm

npm i --save-dev webpack-lambda-layer-plugin

Usage

webpack.config.js

import { LambdaLayerExternalsPlugin } from "webpack-lambda-layer-plugin";

const config: WebpackConfiguration = {
  entry: "index.js",
  output: {
    filename: "[name]/handler.js",
    path: path.resolve("dist"),
  },
  
  plugins: [
    new LambdaLayerExternalsPlugin(),
  ],
}

export default config;

This will generate a zip archive dist/externals.zip containing the used node_modules dependencies, alongside your Lambda Function bundles.

Keywords

webpack

FAQs

Package last updated on 18 Mar 2023

Did you know?

Socket

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.

Install

Related posts