Skip to content

feat: updates the default contenthash length in filenames from 8 to 10#1515

Merged
Timeless0911 merged 1 commit intomainfrom
codex/fix/core-contenthash-10
Mar 5, 2026
Merged

feat: updates the default contenthash length in filenames from 8 to 10#1515
Timeless0911 merged 1 commit intomainfrom
codex/fix/core-contenthash-10

Conversation

@Timeless0911
Copy link
Copy Markdown
Contributor

@Timeless0911 Timeless0911 commented Mar 5, 2026

Summary

Align Rslib with the Rsbuild v2 contenthash default change by switching the default output.filenameHash: true expansion in @rslib/core from .[contenthash:8] to .[contenthash:10].

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings March 5, 2026 11:10
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying rslib with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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].

@Timeless0911 Timeless0911 changed the title fix(core): use 10-char contenthash in output filenames feat: updates the default contenthash length in filenames from 8 to 10 Mar 5, 2026
@Timeless0911 Timeless0911 enabled auto-merge (squash) March 5, 2026 11:17
@Timeless0911 Timeless0911 merged commit 57f1fcc into main Mar 5, 2026
18 of 19 checks passed
@Timeless0911 Timeless0911 deleted the codex/fix/core-contenthash-10 branch March 5, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants