rollup-plugin-cleanup icon indicating copy to clipboard operation
rollup-plugin-cleanup copied to clipboard

Using hooks as filters

Open jespertheend opened this issue 4 years ago • 0 comments

For example:

jsCleanup(code, null, {
    comments: [
        (commentContent) => {
            return commentContent.includes("preserve");
        }
    ]
})

This allows more granular control over which comments to keep and which ones to discard.

I think I might be able to do a PR if you like.

jespertheend avatar Oct 29 '21 11:10 jespertheend