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

serverless-copy-webpack-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

serverless-copy-webpack-plugin

Webpack plugin to be used in combination with serverless webpack in order to copy resources to individual lambda functions

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
117
-3.31%
Maintainers
1
Weekly downloads
 
Created
Source

serverless-copy-webpack-plugin

version downloads

Should hopefully be obsolete when serverless-webpack #327 gets merged.

Webpack plugin to be used in combination with serverless-webpack to allow copying files to individual functions

Note: Originated from the discussion in serverless-webpack issues #425. Based on the code by @Omicron7 and @raymond-w-ko

Usage

To begin, install the plugin as dev dependency

$ npm install serverless-copy-webpack-plugin --save-dev

Then add the plugin to your webpack.config.js

const ServerlessCopyWebpackPlugin = require('serverless-copy-webpack-plugin');

module.exports = {
  plugins: [
    new ServerlessCopyWebpackPlugin()
  ],
};

The plugin will now copy any resources defined in your individual package includes to the artifacts for those functions. For example:

functions:
  hello:
    handler: handler.hello
    package:
      include:
        src/static/*.html

will copy any html files in the src/static folder to the corresponding function package

Keywords

webpack

FAQs

Package last updated on 28 Apr 2021

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