Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

contenthash is unstable #3174

Closed
ityuany opened this issue May 17, 2023 · 15 comments
Closed

contenthash is unstable #3174

ityuany opened this issue May 17, 2023 · 15 comments
Assignees
Labels
bug Something isn't working stale

Comments

@ityuany
Copy link
Contributor

ityuany commented May 17, 2023

System Info

System: mac os 13.3.1
npmPackages: pnpm 8.1.0

Details

复现仓库

反复多次执行 npm run build , 进入 detail/statics 文件夹, 观察 chunk-shineout.[contenthash:8].js 的文件名 hash 值是不稳定的, 每次都会产生变化

Reproduce link

https://github.com/sheinsight/rspack-demo-contenthash

Reproduce Steps

  1. pnpm i
  2. pnpm run build
@ityuany ityuany added bug Something isn't working pending triage The issue/PR is currently untouched. labels May 17, 2023
@ityuany
Copy link
Contributor Author

ityuany commented May 17, 2023

不好意思, 刚刚的仓库包含了 内网域名, 已经被移除, 已经更新了最新的仓库地址

@ahabhgk
Copy link
Contributor

ahabhgk commented May 17, 2023

contenthash 计算目前确实有些问题,可以开启 optimization.realContentHash = true 来 workaround,现在不会默认开启,0.2 后会默认生产开启

@hyf0 hyf0 removed the pending triage The issue/PR is currently untouched. label May 17, 2023
@hyf0 hyf0 added this to the 0.2.0 - Minor milestone May 17, 2023
@hoivee

This comment was marked as off-topic.

@ahabhgk

This comment was marked as off-topic.

@shaodahong
Copy link

ye, same issue

@hoivee

This comment was marked as off-topic.

@ahabhgk

This comment was marked as off-topic.

@hoivee

This comment was marked as off-topic.

@Boshen Boshen changed the title contenthash 值不稳定 contenthash is unstable May 18, 2023
@hardfist hardfist reopened this May 30, 2023
@hardfist

This comment was marked as off-topic.

@hoivee

This comment was marked as off-topic.

@ahabhgk

This comment was marked as off-topic.

@hyf0 hyf0 removed this from the 0.2.0 - Minor milestone Jun 7, 2023
@hardfist
Copy link
Contributor

@ityuany @ahabhgk can this be closed now?

@ahabhgk
Copy link
Contributor

ahabhgk commented Jul 12, 2023

No, it can be workaround by real content hash, but it's different with this issue

@stale
Copy link

stale bot commented Sep 10, 2023

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!

@stale stale bot added the stale label Sep 10, 2023
@ahabhgk
Copy link
Contributor

ahabhgk commented Sep 11, 2023

Just take another look in this reproduce, after upgrading less to v4.2.0, the contenthash is stable, before is less v4.1.3, seems related to less/less.js#3567

so close this issue, feel free to re-open it if you have any further questions

@ahabhgk ahabhgk closed this as completed Sep 11, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

6 participants