-
Notifications
You must be signed in to change notification settings - Fork 1.5k
No hash value causes the cache problem #329
Comments
Added in f28f53a |
This solution is not good. Please reconsider. Hash should be not from content, but from relative path. Squirrel delta updates, AppImage delta updates, Appx block map, and planned Nsis block map updates work correctly only and only if file names are not changed. Otherwise delta file / block map diff will be huge for minor change. Yes — electron builder uses ASAR by default, but in any case better to use another solution. |
This brings up a good point. Would adding a query hash be a better solution? Instead of |
@SimulatedGREG Query is not a solution, because to solve this issue we need to emit files with different names. @chenweiqun Do you mean that such files located in the some external node module? Because if you will put files to static, it will be processed as is and not copied to |
Looking at the Hash: 1f29967d01d8a29a16de
Version: webpack 2.7.0
Time: 9768ms
Asset Size Chunks Chunk Names
imgs/src/renderer/assets/a/logo.png 61.9 kB [emitted]
imgs/src/renderer/assets/b/logo.png 124 kB [emitted]
renderer.js 100 kB 0 [emitted] renderer
styles.css 1.25 kB 0 [emitted] renderer
index.html 352 bytes [emitted] |
@SimulatedGREG I still don't understand the issue. I tried to write unit test, but not luck. In your example now I see that such assets placed in the The question is — why? Why these assets not placed into the |
If you say that yes, we should support such use case, we can easily send PR to file-loader to use hash of path, instead of hash of content. |
The problem that @chenweiqun originally mentioned would produce the following output, which contains only 1 Hash: 1f29967d01d8a29a16de
Version: webpack 2.7.0
Time: 9768ms
Asset Size Chunks Chunk Names
imgs/logo.png 61.9 kB [emitted]
renderer.js 100 kB 0 [emitted] renderer
styles.css 1.25 kB 0 [emitted] renderer
index.html 352 bytes [emitted] Because both
This is more of a |
Okay, turns out Hash: d76a8a9a6ee95013e16c
Version: webpack 3.5.5
Time: 1096ms
Asset Size Chunks Chunk Names
imgs/a/logo.png 61.9 kB [emitted]
imgs/b/logo.png 61.9 kB [emitted]
renderer.js 1.09 MB 0 [emitted] [big] renderer
index.html 420 bytes [emitted] |
The same fix applied to electron-webpack, thanks for clear explanation and good fix. |
Describe the issue / bug.
No hash value causes the cache problem
How can I reproduce this problem?
assets/image/a/1.png
assets/image/b/1.png
when you use both at the same time, a/1.png will be replaced by b/1.png because their names are the same
bugfix
The text was updated successfully, but these errors were encountered: