Skip to content

fix: keep legal and annotation comments for minify: 'dce-only'#5280

Merged
sapphi-red merged 1 commit intomainfrom
07-15-fix_keep_legal_and_annotation_comments_for_minify_dce-only_
Jul 15, 2025
Merged

fix: keep legal and annotation comments for minify: 'dce-only'#5280
sapphi-red merged 1 commit intomainfrom
07-15-fix_keep_legal_and_annotation_comments_for_minify_dce-only_

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Jul 15, 2025

For minify: 'dce-only', legal comments and annotation comments should be kept as that is the behavior in original Vite / esbuild.

Copy link
Member Author

sapphi-red commented Jul 15, 2025

@sapphi-red sapphi-red force-pushed the 07-15-refactor_pass_the_while_codegenoptions_to_ecmacompiler_minify_ branch from e7797aa to ee03ed6 Compare July 15, 2025 02:42
@sapphi-red sapphi-red force-pushed the 07-15-fix_keep_legal_and_annotation_comments_for_minify_dce-only_ branch from 2ca9437 to 54c1931 Compare July 15, 2025 02:42
@sapphi-red sapphi-red marked this pull request as ready for review July 15, 2025 02:45
@github-actions
Copy link
Contributor

github-actions bot commented Jul 15, 2025

Benchmarks Rust

  • target: main(7006a3c)
  • pr: 07-15-fix_keep_legal_and_annotation_comments_for_minify_dce-only_(30b453a)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     75.4±1.44ms        ? ?/sec    1.00     75.7±1.57ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     86.2±1.58ms        ? ?/sec    1.00     86.0±1.59ms        ? ?/sec
bundle/bundle@rome_ts                                        1.01    113.7±2.87ms        ? ?/sec    1.00    112.8±1.88ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    133.5±1.41ms        ? ?/sec    1.00    133.9±1.74ms        ? ?/sec
bundle/bundle@threejs                                        1.00     41.6±1.61ms        ? ?/sec    1.00     41.7±2.26ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.01     51.2±2.08ms        ? ?/sec    1.00     50.5±0.62ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    441.1±4.65ms        ? ?/sec    1.00    439.9±4.43ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    513.8±3.43ms        ? ?/sec    1.00    512.3±5.20ms        ? ?/sec
scan/scan@rome_ts                                            1.00     88.8±1.69ms        ? ?/sec    1.04     92.3±2.40ms        ? ?/sec
scan/scan@threejs                                            1.00     31.0±2.04ms        ? ?/sec    1.00     31.1±2.20ms        ? ?/sec
scan/scan@threejs10x                                         1.00    327.4±4.19ms        ? ?/sec    1.02    333.7±5.59ms        ? ?/sec

Base automatically changed from 07-15-refactor_pass_the_while_codegenoptions_to_ecmacompiler_minify_ to main July 15, 2025 04:17
@sapphi-red sapphi-red force-pushed the 07-15-fix_keep_legal_and_annotation_comments_for_minify_dce-only_ branch from 54c1931 to 30b453a Compare July 15, 2025 04:17
@graphite-app
Copy link
Contributor

graphite-app bot commented Jul 15, 2025

Merge activity

  • Jul 15, 4:17 AM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@netlify
Copy link

netlify bot commented Jul 15, 2025

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 30b453a
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6875d653572a0d000879ff71
😎 Deploy Preview https://deploy-preview-5280--rolldown-rs.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.

@sapphi-red sapphi-red added this pull request to the merge queue Jul 15, 2025
Merged via the queue into main with commit 4a9b11a Jul 15, 2025
22 checks passed
@sapphi-red sapphi-red deleted the 07-15-fix_keep_legal_and_annotation_comments_for_minify_dce-only_ branch July 15, 2025 04:30
This was referenced Jul 17, 2025
shulaoda pushed a commit that referenced this pull request Jul 17, 2025
## [1.0.0-beta.28] - 2025-07-17

### 🚀 Features

- rolldown: oxc v0.77.2 (#5328) by @Boshen
- hmr: add `module` and `exports` parameters to CJS initializer
functions (#5322) by @hyf0
- rolldown_plugin_transform: align with `vitejs/rolldown-vite#318`
(#5318) by @shulaoda
- rolldown_plugin_transform: align with `vitejs/rolldown-vite#315`
(#5315) by @shulaoda
- hmr: automatically disable treeshaking in hmr (#5311) by @hyf0
- hmr: use `trait HmrAstBuilder` to unify ast construction (#5310) by
@hyf0
- rolldown_plugin_chunk_import_map: basic implementation (#5307) by
@shulaoda
- add `watch.onInvalidate` (#5239) by @situ2001
- rolldown_plugin_chunk_import_map: implement initial `render_chunk`
logic (#5306) by @shulaoda
- rolldown: oxc v0.77.1 (#5304) by @Boshen
- js: expose `experimental.incrementalBuild` option (#5300) by
@IWANABETHATGUY
- js: support `experimental.onDemandWrapping` option (#5299) by
@IWANABETHATGUY
- support on demand wrapping for entry chunk (#5291) by @IWANABETHATGUY
- rolldown_plugin_chunk_import_map: initialize (#5289) by @shulaoda
- show owner module id for "canonical name not found for" errors (#5288)
by @sapphi-red

### 🐛 Bug Fixes

- only transform VarDeclaration when enable `keepNames` (#5323) by
@IWANABETHATGUY
- keepNames with special Ifstmt (#5320) by @IWANABETHATGUY
- incremental watch panic when adding dynamic import (#5309) by
@IWANABETHATGUY
- make leaf module wrapping optimization opt-in (#5305) by
@IWANABETHATGUY
- `keepNames` should consider exportNamed function declaration (#5298)
by @IWANABETHATGUY
- undefined `process.versions` for browser build (#5295) by @sxzz
- sanitizeFileName: entry name should be sanitized (#5283) by @shulaoda
- minify-internal-exports: ensure minifying internal exports stably
(#5281) by @hyf0
- keep legal and annotation comments for `minify: 'dce-only'` (#5280) by
@sapphi-red
- unstable chunk generation when `preserveEntrySignatures: false` is
used (#5274) by @IWANABETHATGUY

### 🚜 Refactor

- pass the while CodegenOptions to `EcmaCompiler::minify` (#5279) by
@sapphi-red
- avoid iterate `canonical_exports` twice (#5276) by @IWANABETHATGUY

### 📚 Documentation

- pluginutils: add README file (#5262) by @TheAlexLichter

### ⚡ Performance

- inline function expression when rewriting `name` property with
`keepNames` enabled (#5321) by @IWANABETHATGUY
- rolldown_sourcemap: cache source id -> source text mapping (#5285) by
@Boshen
- rolldown_sourcemap: disable rayon (#5284) by @Boshen

### 🧪 Testing

- rust: prevent meaningless snapshot change from bumping oxc runtime
versions (#5312) by @hyf0

### ⚙️ Miscellaneous Tasks

- upgrade to NAPI-RS 3.0 stable (#5324) by @Brooooooklyn
- infra: add onlyBuiltDependencies (#5287) by @situ2001
- improve the order of import keys in the exports field (#5314) by @btea
- deps: update dependency rolldown-plugin-dts to v0.13.14 (#5293) by
@renovate[bot]
- deps: lock file maintenance rust crates (#5267) by @renovate[bot]
- deps: lock file maintenance npm packages (#5266) by @renovate[bot]
- deps: update github-actions (#5265) by @renovate[bot]

### ❤️ New Contributors

* @situ2001 made their first contribution in
[#5287](#5287)

Co-authored-by: IWANABETHATGUY <17974631+IWANABETHATGUY@users.noreply.github.com>
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.

2 participants