dkokorev90 / transfer-webpack-plugin

Transfer files to the build directory [UNMAINTAINED]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transfer Webpack Plugin

Transfer files to the build directory

Getting started

Install the plugin:

npm install --save-dev transfer-webpack-plugin

API

new TransferWebpackPlugin(patterns: array, [basePath: string])
  • patterns – array of patterns { from: 'path', to: 'path' }, from – relative to basePath or to context of your config (if basePath is not exists), to – relative to the build directory
  • basePath (optional) – directory to be resolved to from parameter

Usage

var TransferWebpackPlugin = require('transfer-webpack-plugin');

module.exports = {
    context: path.join(__dirname, 'app'),
    plugins: [
        new TransferWebpackPlugin([
            { from: 'i18n', to: 'i18n' },
            { from: 'root' }
        ])
    ]
};

module.exports = {
    plugins: [
        new TransferWebpackPlugin([
            { from: 'i18n', to: 'i18n' },
            { from: 'root' }
        ], path.join(__dirname, 'app'))
    ]
};

About

Transfer files to the build directory [UNMAINTAINED]


Languages

Language:JavaScript 100.0%