This repository can be used to check if and under what circumstances webpack may produce different hashes. See webpack/webpack#1479
Hashes may change between different npm installations. This is because npm's installation is non-deterministic. In order to expect the same hashes, you need to ensure that all loaders and plugins stay unchanged. This is because loaders and plugins generate code. If they change the generated code, the hashes must also change.
This is surprising since the final bundle does not contain any information about filenames (no output.filename
). (If you enabled output.filename
, this is another cause for changing hashes).
As you can see, the hash on the Windows machine is different than the hash on MacOS. This is a logical consequence of 1) since Windows uses backslashes as path separator.
It's probably also due to the fact that Windows uses CRLF
for new lines.