Skip to content
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

[Bug]: [fullhash] not works in production mode #6407

Closed
9aoy opened this issue Apr 29, 2024 · 2 comments · Fixed by #7271
Closed

[Bug]: [fullhash] not works in production mode #6407

9aoy opened this issue Apr 29, 2024 · 2 comments · Fixed by #7271
Assignees
Labels
bug Something isn't working stale team The issue/pr is created by the member of Rspack.

Comments

@9aoy
Copy link
Contributor

9aoy commented Apr 29, 2024

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.

20240429-200000

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
	},
@9aoy 9aoy added bug Something isn't working pending triage The issue/PR is currently untouched. labels Apr 29, 2024
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Apr 29, 2024
@LingyuCoder LingyuCoder self-assigned this Apr 30, 2024
@LingyuCoder
Copy link
Contributor

need to align fullhashModules and dependentHashModules on chunk graph and hot module replacment

@LingyuCoder LingyuCoder removed the pending triage The issue/PR is currently untouched. label Apr 30, 2024
Copy link

stale bot commented Jun 29, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants