I've beeing using YUI Compressor to minify JS files. I have this code:
(function(global) {
"use strict";
var X=1;
/*** my code here ***/
}(window));
And I compress it with this command:
$> java -jar yuicompressor-2.4.7.jar test.js -o test.min.js --verbose
The "use strict" hint is not present in the compressed output file. It seems that YUI removes all hints. And it output this warning:
[WARNING] Invalid hint syntax: use strict
(function(global){ ---> "use strict" <--- ;var X=1;...
Although, my code works fine after compression, I'd like to know if there is an argument to YUICompressor to preserve the hints and/or a way to avoid that warning.
Any advice? Thanks.