Skip to content

jhnns/webpack-hash-test

Folders and files

Image for: Folders and files
NameName
Last commit message
Last commit date

Latest commit

Image for: Latest commit
 

History

Image for: History
4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image for: Repository files navigation

webpack-hash-test

This repository can be used to check if and under what circumstances webpack may produce different hashes. See webpack/webpack#1479

Disclaimer

Image for: Disclaimer

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.

Findings

Image for: Findings

1. Hashes DO change if a filename changes

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).

2. Hashes DO NOT change if the path outside webpack's context change

3. Hashes are different on a different OS

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.

About

Image for: About

This repository can be used to check if and under what circumstances webpack may produce different hashes. See https://github.com/webpack/webpack/issues/1479

Resources

Stars

Watchers

Forks

Releases

Image for: Releases
No releases published

Packages

Image for: Packages 0
No packages published