Skip to content

[Bug]: [content-hash] changes when building same image twice #7992

@SoonIter

Description

@SoonIter

System Info

rspack 1.0.7

Details

same image but different filename

input

├── assets
│   ├── cover-12.bed026dc.webp       <----- "bed026dc" is the content-hash of this file
│   └── cover-12.webp

output

└── static
    ├── image
    │   ├── cover-12.8960ba75.8960ba75.webp
    │   └── cover-12.8960ba75.webp

expected output

aligned with webpack

└── static
    ├── image
    │   ├── cover-12.bed026dc.bed026dc.webp
    │   └── cover-12.bed026dc.webp
image

Reproduce link

https://github.com/SoonIter/rsbuild-image-compress/tree/chore/new-bug

Reproduce Steps

  1. pnpm install
  2. npm run build

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR welcomebugSomething isn't workingpending triageThe issue/PR is currently untouched.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions