feat: updates the default contenthash length in filenames from 8 to 10#1515
Merged
Timeless0911 merged 1 commit intomainfrom Mar 5, 2026
Merged
feat: updates the default contenthash length in filenames from 8 to 10#1515Timeless0911 merged 1 commit intomainfrom
Timeless0911 merged 1 commit intomainfrom
Conversation
Deploying rslib with
|
| Latest commit: |
2a6ab0b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f2d4c766.rslib.pages.dev |
| Branch Preview URL: | https://codex-fix-core-contenthash-1.rslib.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates @rslib/core’s default output.filenameHash: true expansion to use a 10-character contenthash, aligning docs and integration fixtures/snapshots with the new default to keep expectations consistent across the codebase.
Changes:
- Change the default hash template from
.[contenthash:8]to.[contenthash:10]in core output filename composition. - Update integration configs/assertions/snapshots that relied on 8-char content hashes.
- Refresh EN/ZH static-assets documentation examples to use
[contenthash:10].
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/guide/advanced/static-assets.mdx | Updates ZH docs examples for asset filename patterns to [contenthash:10]. |
| website/docs/en/guide/advanced/static-assets.mdx | Updates EN docs examples for asset filename patterns to [contenthash:10]. |
| tests/integration/output/index.test.ts | Adjusts chunk filename expectations for multi-compiler builds to [contenthash:10]. |
| tests/integration/output/chunkFileName-multi/rslib3.config.ts | Updates fixture config to emit 10-char contenthash in JS filenames. |
| tests/integration/output/chunkFileName-multi/rslib2.config.ts | Updates fixture config to emit 10-char contenthash in JS filenames. |
| tests/integration/auto-extension/type-module/config-override/rslib.config.ts | Updates override fixture to use [contenthash:10] where applicable. |
| tests/integration/auto-extension/type-commonjs/config-override/rslib.config.mts | Updates override fixture to use [contenthash:10] where applicable. |
| tests/integration/auto-extension/index.test.ts | Refreshes inline snapshots to reflect 10-char hashes in built output paths. |
| tests/integration/asset/index.test.ts | Updates expected emitted asset filenames/imports to include 10-char hashes. |
| tests/integration/asset/hash/rslib.config.ts | Updates asset filename templates in fixture configs to [contenthash:10]. |
| packages/core/src/config.ts | Changes default boolean filenameHash expansion to .[contenthash:10]. |
fi3ework
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Align Rslib with the Rsbuild v2 contenthash default change by switching the default
output.filenameHash: trueexpansion in@rslib/corefrom.[contenthash:8]to.[contenthash:10].Related Links
Checklist