docs: add minification preservation instructions for banner/footer options#6786
docs: add minification preservation instructions for banner/footer options#6786hyf0 merged 3 commits intorolldown:mainfrom ZiuChen:docs/banner-in-depth
Conversation
How to use the Graphite Merge QueueAdd the label graphite: merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds warning documentation about banner and footer content being stripped during minification. The changes inform users that banners and footers need to be formatted as legal comments to persist through minification.
- Added identical warning blocks to both the
bannerandfootersections - Documented the legal comment formats that preserve content during minification
- Referenced the
legalCommentsoption for additional context
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment was marked as outdated.
This comment was marked as outdated.
Just saw vitejs/rolldown-vite#459 (comment). Adding document is a good move. |
|
I still want to check esbuild's behavior in relation to this. |
Co-authored-by: Copilot <[email protected]> Signed-off-by: Yunfei He <[email protected]>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> Signed-off-by: Yunfei He <[email protected]>
✅ Deploy Preview for rolldown-rs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for rolldown-rs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
## [1.0.0-beta.47] - 2025-11-05 ### 💥 BREAKING CHANGES - `meta.magicString` and `meta.ast` now only initialized once (#6828) by @IWANABETHATGUY ### 🚀 Features - rolldown_plugin_utils: support common module preload config (#6839) by @shulaoda - expose `minify` function (#6836) by @sapphi-red - rolldown_plugin_build_import_analysis: remove all `__VITE_PRELOAD__` (#6833) by @shulaoda - rolldown_plugin_build_import_analysis: inject __vite__mapDeps (#6832) by @shulaoda - rolldown_plugin_build_import_analysis: align partial logic (#6831) by @shulaoda - expose more magic string method in js binding (#6819) by @IWANABETHATGUY - rolldown_plugin_build_import_analysis: align renderBuiltUrl logic (#6808) by @shulaoda - rolldown_plugin_build_import_analysis: align resolve dependencies logic (#6803) by @shulaoda - rolldown_plugin_build_import_analysis: align partial logic (#6802) by @shulaoda ### 🐛 Bug Fixes - rolldown_plugin_build_import_analysis: correct unaligned code (#6845) by @shulaoda - rolldown_binding: resolveDependencies shouldn't return Promise (#6844) by @shulaoda - browser: correct binding file (#6830) by @sxzz ### 🚜 Refactor - rolldown_plugin_vite_html: use module preload instead (#6843) by @shulaoda - rolldown_plugin_build_import_analysis: use module preload config instead (#6841) by @shulaoda - rolldown_binding: correct `renderBuiltUrl` (#6835) by @shulaoda - rolldown_plugin_build_import_analysis: remove unnecessary is_module_preload (#6834) by @shulaoda - rolldown_plugin_build_import_analysis: remove unnecessary `IS_MODERN_FLAG` (#6823) by @shulaoda - rolldown_plugin_build_import_analysis: tweak v2 config (#6804) by @shulaoda ### 📚 Documentation - add link to Native MagicString In-Depth Guide and fix broken markdown syntax (#6827) by @IWANABETHATGUY - update current status of native magic string (#6820) by @IWANABETHATGUY - add specific use cases (#6822) by @shulaoda - add minification preservation instructions for banner/footer options (#6786) by @ZiuChen ### ⚙️ Miscellaneous Tasks - deps: bump oxc-resolver to v11.13.1 (#6847) by @renovate[bot] - deps: update dependency tsdown to v0.16.0 (#6840) by @renovate[bot] - README.md: fix broken documentation link to getting started guide (#6837) by @Cheng-fung ### ❤️ New Contributors * @Cheng-fung made their first contribution in [#6837](#6837) * @ZiuChen made their first contribution in [#6786](#6786) Co-authored-by: shulaoda <[email protected]>
Addresses vitejs/rolldown-vite#459 where users discovered their configured
bannerandfootercontent was stripped during minification.Changes
Added In-depth sections to
bannerandfooterdocumentation explaining legal comment preservation:Comment formats that survive minification:
/*!prefix:/*! My banner */@licensekeyword:/* @license My banner */@preservekeyword:/* @preserve My banner *///!prefix for single-line commentsMinification example showing proper usage with
minify: trueCross-reference to
output.legalCommentsoption (defaults to'inline')Example
Screenshot
The table of contents now shows the new "In-depth" and "Example with minification" subsections under both
bannerandfooteroptions.