-
Notifications
You must be signed in to change notification settings - Fork 161
rebuild from cache changes contenthash #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
ok i think i'm getting closer when HS freezes modules it calls possible solution would be to check if my current workaround is a monkeypatch const NormalModule = require('webpack/lib/NormalModule')
const original = NormalModule.prototype._initBuildHash
NormalModule.prototype._initBuildHash = (compilation) => {
if (this._buildHash !== '')
return
original(compilation)
} |
I think I'm also running into this. For me, I build and it generates the cache. Then I build again, and it builds from cache. Then I build again, and it says the last cache didn't finish saving. |
We have recently noticed some inconsistent asset hashes between different boxes in production. We believe that this is the result of a caching issue with the `hard-source-webpack-plugin`[1]. The safest thing to do for the time being is to temporarily remove the plugin whilst we investigate further. This means that our deployment times will take a hit (~5 mins to build webpack assets) but that feels better than not being able to deploy safely :-) [1] mzgoddard/hard-source-webpack-plugin#454
We have recently noticed some inconsistent asset hashes between different boxes in production. We believe that this is the result of a caching issue with the `hard-source-webpack-plugin`[1]. The safest thing to do for the time being is to temporarily remove the plugin whilst we investigate further. This means that our deployment times will take a hit (~5 mins to build webpack assets) but that feels better than not being able to deploy safely :-) [1] mzgoddard/hard-source-webpack-plugin#454
reproduction repo https://github.com/dreyks/hswp_fail/tree/contenthash
Expected Behavior
Rebuilding unchanged code from cache should result in exact same file and filename
Actual Behavior
Files are same but filenames containing [contenthash] are different.
Steps to Reproduce
https://github.com/dreyks/hswp_fail/tree/contenthash
yarn webpack
- output:main-2f138c469b6d1cc42329.js 3.8 KiB 0 [emitted] main
yarn webpack
again - output:main-80bb0d27ee34d918376b.js 3.8 KiB 0 [emitted] main
Additional info
mode
webpack@4.6.0
does not produce this issueThe text was updated successfully, but these errors were encountered: