webpack-bundle-duplicator-plugin

1.0.0 • Public • Published

webpack-bundle-duplicator-plugin

Don't re-generate the same bundle content multiple times- make copies of your output bundles and specify different names. Save huge amounts of build time when generating multiple copies of the same entry files.

Install

$ npm install webpack-bundle-duplicator-plugin --save-dev

Add Plugin to Webpack

webpack.config.js

const WebpackBundleDuplicatorPlugin = require('webpack-bundle-duplicator-plugin');

module.exports = {
    entry: {
        'js/main.js': 'src/entries/main.js',
    },
    plugins: [
        new WebpackBundleDuplicatorPlugin({
            duplicates: {
                'js/main.js': [
                    'js/dupe1.js',
                    'js/dupe2.js',
                ],
            },
        }),
    ],
};

// Outputs 3 files (all with same contents)
// ./dist/js/main.js
// ./dist/js/dupe1.js
// ./dist/js/dupe2.js

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-bundle-duplicator-plugin

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

2.98 kB

Total Files

4

Last publish

Collaborators

  • seebigs