https://github.com/seebigs/webpack-bundle-duplicator-plugin
Don't re-generate the same bundle content multiple times- make copies of your output bundles and give different names.
https://github.com/seebigs/webpack-bundle-duplicator-plugin
Last synced: 10 months ago
JSON representation
Don't re-generate the same bundle content multiple times- make copies of your output bundles and give different names.
- Host: GitHub
- URL: https://github.com/seebigs/webpack-bundle-duplicator-plugin
- Owner: seebigs
- Created: 2020-08-17T21:55:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-18T01:16:35.000Z (almost 6 years ago)
- Last Synced: 2025-02-16T17:28:19.864Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```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
```