Open dartess opened 2 months ago
I think this is related to https://github.com/webpack-contrib/mini-css-extract-plugin/issues/444
I have no idea how the link to that issue helps solve the problem in the attached repl.
Anyway, the workaround is to not use hashes in names during development.
I have no idea how the link to that issue helps solve the problem in the attached repl.
Sorry, we don't have solutions to this at present, I'll keep this open till we fix this
System Info
System: OS: macOS 14.5 CPU: (10) arm64 Apple M1 Pro Memory: 6.46 GB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 20.12.1 - /usr/local/bin/node Yarn: 1.22.18 - /usr/local/bin/yarn npm: 10.5.0 - /usr/local/bin/npm pnpm: 8.4.0 - ~/Library/pnpm/pnpm bun: 1.0.28 - ~/.bun/bin/bun Browsers: Brave Browser: 126.1.67.116 Chrome: 126.0.6478.62 Chrome Canary: 128.0.6544.0 Edge: 111.0.1661.54 Safari: 17.5 Safari Technology Preview: 17.4 npmPackages: @rspack/cli: ^0.7.4 => 0.7.4 @rspack/core: ^0.7.4 => 0.7.4 @rspack/plugin-react-refresh: ^0.7.4 => 0.7.4
Details
When using dev server and HMR I noticed the following:
updating styles for the main components work correctly.
updating styles for components lazily loaded via
import()
is left for one iteration.Example:
blue
tored
, save the file.Expected result: background is
red
Actual result: the background stillblue
.red
toyellow
, save the file.Expected result: background is
yellow
Actual result: background turnedred
I tried to reproduce the minimal repl and the problem seems to appear when using
[fullhash]
or[contenthash]
in theoutput.filename
/output.chunkFilename
.(although at some point the styles of the main components stopped updating completely)
Reproduce link
https://github.com/dartess/rspack-hmr-bug
Reproduce Steps
npm run dev
src/Page/Page.module.css
with some another colorcolor#1
Expected result: background is
color#1
Actual result: the background stillindianred
.src/Page/Page.module.css
with some another colorcolor#2
Expected result: background is
color#2
Actual result: the background turnedcolor#1
.