Socket
Socket
Sign inDemoInstall

webpack-chunk-hash

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.4.0

3

index.js

@@ -11,2 +11,3 @@ var crypto = require('crypto');

this.digest = options.digest || 'hex';
this.additionalHashContent = options.additionalHashContent || function() { return ''; };
}

@@ -23,3 +24,3 @@

var source = chunk.modules.map(getModuleSource).sort(sortById).reduce(concatenateSource, '')
, hash = crypto.createHash(_plugin.algorithm).update(source)
, hash = crypto.createHash(_plugin.algorithm).update(source + _plugin.additionalHashContent(chunk))
;

@@ -26,0 +27,0 @@

{
"name": "webpack-chunk-hash",
"version": "0.3.0",
"version": "0.4.0",
"description": "Plugin to replace a standard webpack chunk hashing with custom (md5) one.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -37,4 +37,15 @@ # webpack-chunk-hash

## Options
```
// a callback to add more content to the resulting hash
additionalHashContent: function(chunk) { return 'your additional content to hash'; }
// which algorithm to use (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm)
algorithm: 'md5'
// which digest to use (https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding)
digest: 'hex'
```
## License
WebpackChunkHash plugin is released under the [MIT](License) license.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc