webpack-sources
3.7.1 · 18 Nov 2026MIT85.2M / weekRepositoryHomepagenpmAtom feed
3.7.1 is the newest release of 3.x.
In short
1 faster
Release note
Patch Changes
Hash a string-backed source without materializing its buffer
RawSource.updateHashandOriginalSource.updateHashcalledbuffer(), which
encodes the string to UTF-8 and memoizes the result — so every source that was
hashed kept its content twice, as a string and as a buffer, for as long as the
source lived. Node hashes a string as UTF-8, the same bytesbuffer()produces,
so the string is hashed directly instead and no digest changes.Measured on a webpack build of three.js + lodash-es (1033 modules, 2.71 MB of
module source): retainedarrayBuffersafter the build drop from 8.74–8.76 MB
to 5.81 MB withdevtool: false, and from 9.35–12.11 MB to 6.42 MB withdevtool: "source-map"— disjoint over six and five runs. 1029Buffer.from
calls per build are removed, one per module. CPU is unchanged: hashing those
sources costs 9.23 ms via the buffer against 8.18 ms via the string, which no
whole-build timing can resolve.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.