Skip to content

[Bug Report]: contenthash is not changed with different moduleIds config #2270

Description

@jkzing

System Info

System:
OS: macOS 13.2.1
CPU: (10) arm64 Apple M1 Pro
Memory: 108.92 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.19.1 - ~/Library/Caches/fnm_multishells/79180_1678765459198/bin/node
Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/79180_1678765459198/bin/yarn
npm: 8.19.3 - ~/Library/Caches/fnm_multishells/79180_1678765459198/bin/npm
Browsers:
Chrome: 111.0.5563.64
Chrome Canary: 113.0.5652.0
Firefox: 109.0.1
Safari: 16.3

Details

The moduleId doesn't affect the contenthash of the build assets.

For example, when using different optimization.moduleIds ('named' or 'deterministic'), the output filename are always the same. See reproduction below for more details.

Reproduce link

https://github.com/jkzing/rspack-contenthash-reproduction

Reproduce Steps

  1. pnpm install
  2. pnpm run rspack to see rspack build results
  3. pnpm run webpack to see webpack build results

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions