1.1.0 • Published 6 years ago

dedupe-string-plugin v1.1.0

Weekly downloads
37
License
MIT
Repository
github
Last release
6 years ago

dedupe-string-plugin

Build Status Known Vulnerabilities Greenkeeper badge

Dedupe-String-Plugin is a plugin for webpack that is optimized to work with gzip and remove duplicate strings that the gzip compression algorithm is not going to be able to dedupe.

Before dedupe-string-plugin:
function thing() {
  React.createElement('div');
  // ... somewhere outside of the gzip sliding window (32KB)
  React.createElement('div');
}
After dedupe-string-plugin:
function thing() {
  const e = 'div';
  React.createElement(e);
  // ... somewhere outside of the gzip sliding window (32KB
  React.createElement(e);
}
Webpack usage
var DedupeString = require('dedupe-string-plugin');

module.exports = {
  plugins: [
    new DedupeString()
  ]
};