#11060·rolldown

[Feature Request]: add support for retaining comments using a regular expression (RegExp)

Author: dasaCreated Oct 1, 2026Updated Oct 1, 2026
Labelson hold: to be discussed

What problem does this feature solve?

It'd be great to be able to use a RegExp to control which comments are preserved, similar to Terser's format.comments support.

What does the proposed API look like?

It could be a new property here: https://rolldown.rs/reference/OutputOptions.comments