Our team recently implemented YUI Compressor (2.4.8) on our project and it's been performing well. However, we encountered an unexpected issue while minifying JavaScript files that contain special comments.
It appears that YUI Compressor is automatically adding a semi-colon after special comments. Even when we removed all JS code and only left the special comment, a semi-colon was still appended.
Below is an example of the input and output:
/*!
* WHY YOU ADD SEMI COLON?!
*/
Output:
/*!
* WHY YOU ADD SEMI COLON?!
*/;
We've done some research online but haven't found anyone else who has experienced this specific issue. It's worth noting that this problem doesn't seem to affect CSS files.
Does anyone know if this is a common problem with YUI Compressor? And if so, how can we resolve it?