oxc icon indicating copy to clipboard operation
oxc copied to clipboard

minifier: turn off pure annotations

Open Boshen opened this issue 9 months ago • 2 comments

https://github.com/rolldown/rolldown/issues/3753

Boshen avatar Mar 04 '25 01:03 Boshen

supplement, treeshake.annotation in rollup includes both @__PURE__, @__NO_SIDE_EFFECTS__ https://rollupjs.org/configuration-options/#treeshake-annotations

IWANABETHATGUY avatar Mar 06 '25 11:03 IWANABETHATGUY

Going through Rolldown's SideEffectDetector and Rollup's treeshake configuration, oxc's side effect detector should also include

  • https://rollupjs.org/configuration-options/#treeshake-manualpurefunctions
  • https://rollupjs.org/configuration-options/#treeshake-unknownglobalsideeffects

So we can eventually merge the two implementations and provide a unified functionality.

Boshen avatar Mar 14 '25 12:03 Boshen