shershen08 / webpack-copy-on-build-plugin

A plugin to copy files after Webpack has finished building

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webpack-copy-on-build-plugin

Webpack plugin that will copy/paste files after build.

Installation

npm install --save-dev webpack-copy-on-build-plugin

Usage

In config file:

var WebpackOnBuildPlugin = require('on-build-webpack');

// ...
  module: {
    plugins: [
      new WebpackCopyOnBuildPlugin([
         {
           from: config.output.path + '/app.[hash].js',
           to: config.output.path + '/app.js'
         },
         {
           from: config.output.path + '/app.[hash].js.map',
           to: config.output.path + '/app.js.map'
         }
        ])
    ]
  },
// ...

About

A plugin to copy files after Webpack has finished building

License:MIT License


Languages

Language:JavaScript 100.0%