Skip to content

docs: add filename placeholders documentation#12301

Merged
chenjiahan merged 6 commits intomainfrom
filename_placeholders_doc_1126
Nov 26, 2025
Merged

docs: add filename placeholders documentation#12301
chenjiahan merged 6 commits intomainfrom
filename_placeholders_doc_1126

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Add documentation to introduce all filename placeholders.

The document content has been rewritten based on the original "Template string" section and additional content has been added for explanation.

Related links

Checklist

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

Copilot AI review requested due to automatic review settings November 26, 2025 09:38
@netlify
Copy link
Copy Markdown

netlify bot commented Nov 26, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit 34fdd27
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6926cd031e576b0008126be4
😎 Deploy Preview https://deploy-preview-12301--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added release: document release: document related release(mr only) team The issue/pr is created by the member of Rspack. labels Nov 26, 2025
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

This PR adds comprehensive documentation for filename placeholders in Rspack by creating a new dedicated page that consolidates and expands upon the previous "Template string" section from the output configuration page. The documentation is provided in both English and Chinese, improving developer understanding of how to use placeholders for dynamic filename generation in builds.

  • Introduces a new /config/filename-placeholders documentation page explaining all available placeholder types and their usage
  • Removes the "Template string" section from the output configuration page and replaces internal references with links to the new dedicated page
  • Updates examples to use more practical patterns (e.g., [contenthash:8].wasm instead of [id].[hash].wasm)

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
website/docs/en/config/filename-placeholders.mdx New documentation page for filename placeholders in English
website/docs/zh/config/filename-placeholders.mdx New documentation page for filename placeholders in Chinese
website/docs/en/config/output.mdx Removes "Template string" section, adds links to new placeholders page, updates examples
website/docs/zh/config/output.mdx Removes "Template string" section, adds links to new placeholders page, updates examples
website/docs/en/config/_meta.json Adds filename-placeholders to navigation menu
website/docs/zh/config/_meta.json Adds filename-placeholders to navigation menu
website/docs/en/api/javascript-api/compilation.mdx Updates references from "Template String" to "Filename placeholders"
website/docs/zh/api/javascript-api/compilation.mdx Updates references from "Template String" to "Filename placeholders"
website/project-words.txt Adds "qwertyui" (used in documentation examples) to spell check dictionary
crates/rspack_core/src/options/filename.rs Updates code comment from "template string" to "placeholders" for consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

chenjiahan and others added 4 commits November 26, 2025 17:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
LingyuCoder
LingyuCoder previously approved these changes Nov 26, 2025
@github-actions
Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 34fdd27 to refactor: render mf runtime by runtime template (#12298) by harpsealjs

🙈 Size remains the same at 47.67MB

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Nov 26, 2025

CodSpeed Performance Report

Merging #12301 will not alter performance

Comparing filename_placeholders_doc_1126 (34fdd27) with main (9051144)1

Summary

✅ 17 untouched

Footnotes

  1. No successful run was found on main (dccf124) during the generation of this report, so 9051144 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@chenjiahan chenjiahan merged commit a60ea01 into main Nov 26, 2025
45 of 47 checks passed
@chenjiahan chenjiahan deleted the filename_placeholders_doc_1126 branch November 26, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: document release: document related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: [name] placeholder in webassemblyModuleFilename is rendered incorrectly

3 participants