nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.75k stars 2.37k forks source link

React / rspack : css file not being hashed #29011

Open seb-mynotary opened 1 day ago

seb-mynotary commented 1 day ago

Current Behavior

The bundled scss file don't have a unique hash in the file name (eg: main.css) This cause issue with browser caching.

Expected Behavior

The bundled scss file should have a unique file name (eg: main.randomHash.css)

GitHub Repo

No response

Steps to Reproduce

  1. git clone https://github.com/seb-mynotary/nx-rspack.git
  2. nx run demo:build:production
  3. Inspect the generated html and main.css

Nx Report

Node           : 20.10.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.4.0

nx (global)        : 20.0.6
nx                 : 20.1.2
@nx/js             : 20.1.2
@nx/eslint         : 20.1.2
@nx/workspace      : 20.1.2
@nx/eslint-plugin  : 20.1.2
@nx/react          : 20.1.2
@nx/rspack         : 20.1.2
@nx/vite           : 20.1.2
@nx/web            : 20.1.2
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx/vite/plugin
@nx/eslint/plugin

Failure Logs

Package Manager Version

No response

Operating System

Additional Information

No response