https://github.com/markis/dedupe-string-plugin
Deduplicate strings from javascript files
https://github.com/markis/dedupe-string-plugin
Last synced: 7 months ago
JSON representation
Deduplicate strings from javascript files
- Host: GitHub
- URL: https://github.com/markis/dedupe-string-plugin
- Owner: markis
- License: mit
- Created: 2017-03-20T17:51:06.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-06T23:46:55.000Z (about 6 years ago)
- Last Synced: 2024-12-27T18:26:49.411Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://npm.im/dedupe-string-plugin
- Size: 60.5 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# dedupe-string-plugin
[](https://travis-ci.org/markis/dedupe-string-plugin) [](https://snyk.io/test/github/markis/dedupe-string-plugin) [](https://greenkeeper.io/)
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:
``` javascript
function thing() {
React.createElement('div');
// ... somewhere outside of the gzip sliding window (32KB)
React.createElement('div');
}
```
##### After dedupe-string-plugin:
``` javascript
function thing() {
const e = 'div';
React.createElement(e);
// ... somewhere outside of the gzip sliding window (32KB
React.createElement(e);
}
```
##### Webpack usage
``` javascript
var DedupeString = require('dedupe-string-plugin');
module.exports = {
plugins: [
new DedupeString()
]
};
```