erikras / erikras/react-redux-universal-hot-example

Webpack [hash] differs on different computers

Open
#251 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.1k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

Once I run npm run build on different computers I'm getting different hash, because source map loader is generating js files depending on hash name used for source map files:

![screenshot-41](https://cloud.githubusercontent.com/assets/5091/10132215/41cc0f46-65cd-11e5-9892-11b7b9f18b8a.png)

Lets disable source map using setting `devtool` to null (`devtool: null`):

![screenshot-43](https://cloud.githubusercontent.com/assets/5091/10132849/98529ba2-65d0-11e5-8138-bb208f0abe94.png)

Now you can see the files are all the same, but the hash generated differently on different computers.

Because we have multiple application servers which are response through load-balancer, and we are not sending our assets to any CDN, we are getting into a trouble, because assets names are not the same.
- Any ideas why is that happen?
- How do the webpack generates `[hash]`?

Contributor guide

Open the contributing guide

Research direction

Start by running npm run build on the different computers described in the report and compare the generated asset names with source maps enabled and with devtool set to null. Read the webpack configuration and webpack's [hash] behavior; done means identifying the source of the differing hashes and establishing reproducible asset names across builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.