rspack
rspack copied to clipboard
[Bug]: [fullhash] not works in production mode
System Info
rspack 0.6.3
Details
Filename "[fullhash]" does not work in production mode, the output filename hash is different from the compilation hash.
However, when I set optimization.realContentHash is false, it works. Seems we should not add contentHash if this chunk is a fullHashModule when createHash.
Reference webpack:
https://github.com/webpack/webpack/blob/7b4775cebe372f9396d8f3b61ef1347cb633956e/lib/Compilation.js#L4334-L4337
https://github.com/webpack/webpack/blob/ab47c696a403862dbd996f8c2f1ef3770f24ee09/lib/optimize/RealContentHashPlugin.js#L173-L192
Reproduce link
No response
Reproduce Steps
Apply the following configuration in rspack.config.js:
output: {
filename: `[name].[fullhash].js`
},
optimization: {
realContentHash: true // or false
},
stats: {
hash: true
},
need to align fullhashModules and dependentHashModules on chunk graph and hot module replacment
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!