Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React / rspack : css file not being hashed #29011

Closed
1 of 4 tasks
seb-mynotary opened this issue Nov 20, 2024 · 1 comment · Fixed by #29058
Closed
1 of 4 tasks

React / rspack : css file not being hashed #29011

seb-mynotary opened this issue Nov 20, 2024 · 1 comment · Fixed by #29058

Comments

@seb-mynotary
Copy link

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

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Coly010 added a commit that referenced this issue Nov 25, 2024
## Current Behavior
Current default for outputHashing is set to 'none'.
This means that both executor and plugin usage will output file names
that will not bust browser cache.

## Expected Behavior
Set default for `outputHashing` to 'all' to ensure all outputted files
are hashed allowing for cache busting.

## Related Issue(s)

Fixes #29011
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant