0.0.2 • Published 2 years ago

@elricb/webpack-add-assets v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

webpack-add-assets

Plugin for webpack.

Add additional assets to webpack build directory.

Requirements

Install

$ npm install --save-dev @elricb/webpack-add-assets

Example

const WebpackAddAssets = require("@elricb/webpack-add-assets");

const webpackConfig = {
  // Config items
  plugins: [
    new WebpackAddAssets({
      "local/path/file.txt": "remote/path/file.txt"
    })
  ],
  // Config items
};

class WebpackAddAssets

const webpackAddAssets = new WebpackAddAssets(assets);

assets

Type: object

A key/value list of source files to destination files.

{
  "relative/local/path/to/asset/favicon.gif": "relative/destination/path/to/asset/favicon.gif",
  "another/local/asset/favicon.ico": "another/destination/asset/favicon.gif"
}