Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug]: compilation hash stays same even if minimizer produces non-deterministic output #13937

@7rulnik

Description

@7rulnik

System Info

  System:
    OS: macOS 26.3.1
    CPU: (16) arm64 Apple M4 Max
    Memory: 4.73 GB / 64.00 GB
    Shell: 4.6.0 - /opt/homebrew/bin/fish
  Binaries:
    Node: 24.13.0 - /Users/v7rulnik/.local/state/fnm_multishells/38018_1778144247928/bin/node
    Yarn: 4.12.0 - /Users/v7rulnik/.local/state/fnm_multishells/38018_1778144247928/bin/yarn
    npm: 11.6.2 - /Users/v7rulnik/.local/state/fnm_multishells/38018_1778144247928/bin/npm
    bun: 1.3.13 - /opt/homebrew/bin/bun
    Deno: 2.7.14 - /opt/homebrew/bin/deno
    Watchman: 2026.05.04.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 147.0.7727.138
    Firefox: 150.0.1
    Safari: 26.3.1
  npmPackages:
    @rspack/cli: 2.0.2 => 2.0.2
    @rspack/core: 2.0.2 => 2.0.2
    @rspack/dev-server: 2.0.1 => 2.0.1
    @rspack/plugin-react-refresh: 2.0.0 => 2.0.0

Details

Sometime minificator can produce non-deterministic result. But fullhash stays same even final output is different.

There are at least 2 issues (first one is mine) in lightningcss:

As I understand hash is computed before minification. And webpack behaviour is same in this case.

Reproduce link

https://github.com/7rulnik/rspack-fullhash-css-repro

Reproduce Steps

https://github.com/7rulnik/rspack-fullhash-css-repro#reproductions

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending triageThe issue/PR is currently untouched.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions