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

webpack-copy-bundle

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-copy-bundle

Webpack plugin to copy your bundle after a successful build.

latest
Source
npmnpm
Version
0.9.0
Version published
Maintainers
1
Created
Source

Webpack Copy Bundle Plugin

NPM License Coverage Downloads Build

Webpack plugin to copy your bundle after a successful build.

In some cases you might want to copy your bundle to a directory after a successful build. However, Webpack does not allow you to do these 'out-of-source' builds. You can use the standard Webpack Copy Plugin, however then you need to manually copy all related files (bundle, source-map, etc.). To make this a bit easier you can use the Webpack Copy Bundle Plugin

Using this plugin you can give a list of bundles to copy and where to copy them to. The plugin takes care of copying all of the related files to the output directory.

Installation

npm install webpack-copy-bundle --save-dev

Usage

const WebpackCopyBundle = require('./src');

module.exports = {

    entry: './src/index.js',

    plugins: [
        new WebpackCopyBundle({
            main: '../example/folder',
        })
    ]
};

Example of multiple entries:

const WebpackCopyBundle = require('./src');

module.exports = {

    entry: {
        main: './src/index.js',
        worker: './src/worker.js'
    },

    plugins: [
        new WebpackCopyBundle({
            main: '../example/folder',
            worker: '../example/folder/worker',
        })
    ]
};

Keywords

webpack

FAQs

Package last updated on 07 Jan 2024

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