Closed alexborisyuk closed 8 years ago
Hi @alexborisyuk I digged a little a bit and found out that yuicompressor is complaining about reserved keywords usage, because its parser (Rhino) is not ES5 compliant yet. refer to https://github.com/yui/yuicompressor/issues/98 looks like a yuicompressor issue I would suggest you to use another minifier.
I use uncompressed hls.js in my project. To compress code I use Yahoo compressor (https://github.com/yui/yuicompressor). The source code of this hls.js module is using JS reserved words catch and default this words are indeed marked as reserved https://github.com/yui/yuicompressor/blob/master/src/com/yahoo/platform/yui/compressor/JavaScriptCompressor.java#L181-L183 In the result I can not compress hls.js
Steps to reproduce
To solve this problem I change all the reserved words in hls.js ("default" to "__default" etc.).
Expected behavior
Yahoo compressor works with uncompressed hls.js without errors; compressed js-file creates.
Actual behavior
Lot of Yahoo compressor's errors; compression fails.
Console output
Is it possible to change names of fields and properties in code of hls.js to do not use the reserved words? Thanks!