Skip to content

feat: warn if using [contenthash] in filenames in development mode #10521

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cseas
Copy link

@cseas cseas commented May 29, 2025

Summary

Using [contenthash] in filenames in development mode would bloat memory. Added a warning to the console if [contenthash] is added to the filename in development mode.

Feature request: #9513

Gave a shot at implementing the feature. Please let me know if the warning should be added somewhere else in the codebase or if this needs an accompanying documentation update as well. I'd imagine the warning should go somewhere in the output docs as well: https://rspack.rs/config/output

Update: I noticed that the warning for this is already documented but it's too far down the page in another section and I just happened to stumble across it as I was reading the docs.

Screenshot 2025-05-31 at 02 26 02

IMO it'd be easier to come across this warning if it came earlier in the output.filename docs, right where the usage of contenthash is first suggested:

Screenshot 2025-05-31 at 02 28 02

Let me know, I'll move the warning up in the page if it makes sense.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented May 29, 2025

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit a37ad4b
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68389c319f29af000881e5aa

@CLAassistant
Copy link

CLAassistant commented May 29, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label May 29, 2025
@cseas cseas force-pushed the feat-warn-contenthash-dev branch from 870cd11 to a37ad4b Compare May 29, 2025 17:41
@chenjiahan chenjiahan requested a review from h-a-n-a May 30, 2025 02:22
@cseas
Copy link
Author

cseas commented Jun 9, 2025

@h-a-n-a Please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants