Open samualtnorman opened 1 year ago
If this is intentional behaviour, it would be neat if we had a flag to override it.
Yes, see the ignoreCustomComments
setting, that you can change.
https://github.com/terser/html-minifier-terser?tab=readme-ov-file#options-quick-reference
ignoreCustomComments | Array of regex'es that allow to ignore certain comments, when matched | [ /^!/, /^\s*#/ ] |
---|
So in your case removing , /^\s*#/
should work.
What happened?
removeComments: true
removes all comments except those that start with#
.If this is intentional behaviour, it would be neat if we had a flag to override it.
Version
v7.2.0
What browsers are you seeing the problem on?
Firefox, Chrome, Safari
Link to reproduce
https://stackblitz.com/edit/stackblitz-starters-trumlr?file=index.js
Relevant log output
No response
Willing to submit a PR?
No