-
-
Notifications
You must be signed in to change notification settings - Fork 757
Open
Labels
pending triageThe issue/PR is currently untouched.The issue/PR is currently untouched.
Description
System Info
System:
OS: macOS 26.2
CPU: (16) arm64 Apple M4 Max
Memory: 7.35 GB / 64.00 GB
Shell: 5.9 - /opt/homebrew/bin/zsh
Binaries:
Node: 22.8.0 - /Users/v7rulnik/.local/state/fnm_multishells/48371_1769509735708/bin/node
npm: 10.8.2 - /Users/v7rulnik/.local/state/fnm_multishells/48371_1769509735708/bin/npm
Browsers:
Chrome: 144.0.7559.97
Safari: 26.2
npmPackages:
@rspack/cli: latest => 1.7.4
@rspack/core: latest => 1.7.4
Details
When CSS content changes but JavaScript remains unchanged, the [fullhash] placeholder does not update, while [contenthash] correctly updates.
Current behavior:
- CSS [contenthash] correctly updates when CSS changes
- Compilation [fullhash] incorrectly stays the same
Expected behavior:
- Both [contenthash] and [fullhash] should update when CSS content changes
This causes different build outputs to have identical fullhashes.
Webpack comparison: Webpack correctly updates [fullhash] when CSS changes. The reproduction repo includes both Rspack and Webpack tests demonstrating this difference.
Reproduce link
https://github.com/7rulnik/rspack-fullhash-css-repro
Reproduce Steps
- Clone the repo: git clone https://github.com/7rulnik/rspack-fullhash-css-repro
- Run the reproduction script:
cd rspack-fullhash-css-repro/rspack-test
npm install
./reproduce.sh - Observe the output:
- Build 1 produces main.[fullhash].js and main.[contenthash].css
- CSS is modified (color changes from red to green)
- Build 2 produces files with the same fullhash but different contenthash
Result:
BUILD 1:
[fullhash]: 15d7bc99b1b65226
[contenthash]: 6fdaa5b099f97dd7
BUILD 2 (CSS changed, JS unchanged):
[fullhash]: 15d7bc99b1b65226 β SAME (bug!)
[contenthash]: 47fc5c9ca2bb0b36 β
CHANGED
For comparison, run ./run-both.sh from the root to see Webpack correctly updating [fullhash] for the same scenario.
AlexandrHoroshih
Metadata
Metadata
Assignees
Labels
pending triageThe issue/PR is currently untouched.The issue/PR is currently untouched.