Skip to content

doc(issue-27440): update documentation regarding minify options & keep-names - #27552

Closed
raonivaladares wants to merge 5 commits into
oven-sh:mainfrom
raonivaladares:docs/issue-27440-minify-syntax
Closed

raonivaladares wants to merge 5 commits into
oven-sh:mainfrom
raonivaladares:docs/issue-27440-minify-syntax

Conversation

@raonivaladares

@raonivaladares raonivaladares commented Feb 28, 2026 •

Copy link
Copy Markdown

What does this PR do?

Fixes #27440

Updates Minifier docs regarding: --keep-names

  • adds examples at section Modification Modes: link
  • adds example and updates the description at Javascript API: link
  • update examples of When to Use: link

How did you verify your code works?

Modification Modes:
Screenshot 2026-02-28 at 17 01 05

Keep names:
Screenshot 2026-02-28 at 16 23 52

When to use:
Screenshot 2026-02-28 at 16 22 19

@raonivaladares
raonivaladares marked this pull request as ready for review February 28, 2026 15:26
@coderabbitai

coderabbitai Bot commented Feb 28, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between da32078 and 12c55cd.

📒 Files selected for processing (1)
  • docs/bundler/minifier.mdx

Walkthrough

Added and documented the keepNames minifier option, restructured the Minification Modes section into parameterized <ParamField> blocks, expanded examples showing keepNames usage, and clarified how keepNames interacts with identifier and syntax minification and .name preservation.

Changes

Cohort / File(s) Summary
Minifier documentation
docs/bundler/minifier.mdx
Added keepNames to API examples and programmatic config; reworked Minification Modes into <ParamField> blocks documenting keepNames interactions; expanded Keep Names narrative and inline/code examples; clarified that keepNames preserves .name while still permitting identifier/syntax minification and adjusted guidance for combined modes.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'doc(issue-27440): update documentation regarding minify options & keep-names' clearly summarizes the main change: documentation updates about minify options and keep-names behavior.
Description check ✅ Passed The description follows the template with both required sections: 'What does this PR do?' (with issue reference and specific documentation updates) and 'How did you verify your code works?' (with verification screenshots).
Linked Issues check ✅ Passed The PR comprehensively addresses issue #27440 objectives: documents keep-names flag behavior, adds examples in Minification Modes, JavaScript API, and When to Use sections, and explains the interaction with syntax/identifier minification.
Out of Scope Changes check ✅ Passed All changes are focused on documentation updates directly related to the linked issue #27440, addressing minify options and keep-names without introducing unrelated modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/bundler/minifier.mdx`:
- Around line 86-126: The JSX in the three ParamField blocks
(--minify-whitespace, --minify-syntax, --minify-identifiers) uses unnecessary {"
"} tokens and a single-item <ul>/<li> structure; simplify by removing the {" "}
fragments and replacing the single-item list with inline text or a short
sentence (e.g., "Optional modifier: --emit-dce-annotations" or "Optional
modifier: --keep-names") so the fields match other docs' ParamField patterns and
eliminate extra whitespace expressions.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a870e7b and 54b32b1.

📒 Files selected for processing (1)
  • docs/bundler/minifier.mdx

Comment thread docs/bundler/minifier.mdx Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/bundler/minifier.mdx`:
- Around line 88-90: Update the wording in the --minify-whitespace ParamField:
change "re-enable" to "re-emit" for the --emit-dce-annotations flag and replace
the ambiguous "this flag" with an explicit reference to --minify-whitespace so
the sentence reads something like: "Use --emit-dce-annotations to re-emit DCE
annotations, which are disabled by default when --minify-whitespace is active."
Ensure the flags --minify-whitespace and --emit-dce-annotations are mentioned
exactly as identifiers.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 54b32b1 and da32078.

📒 Files selected for processing (1)
  • docs/bundler/minifier.mdx

Comment thread docs/bundler/minifier.mdx Resolved
@robobun

robobun commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Keeping this as the PR for #27440; #27916 covered the same ground and has been closed in favor of this one.

It currently conflicts with main in docs/bundler/minifier.mdx (the wording around Keep Names and the mode descriptions changed in #33112), so it needs a rebase before it can be reviewed.

@robobun

robobun commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Thank you for working on this. I am closing this PR in favor of #41252. Both PRs fix #27440, and we keep one PR per issue.

#41252 describes the --minify-syntax name removal itself, with the conditions for it. It also merges cleanly. This branch still conflicts with main in docs/bundler/minifier.mdx, and it has had no update since the rebase request on 2026-08-13.

Your "Keep Names" change for --minify-syntax is correct, and so is the keepNames example. I suggested both on #41252. The --minify-identifiers lines say that --keep-names keeps .name under identifier minification. The docs on main say the same. A current build does not do this yet, and #12304 tracks it.

@robobun robobun closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minifier docs: --minify-syntax stripping function expression names is undocumented

2 participants