Closed binomialstew closed 8 years ago
Interesting. I'll have to update the Uglify version bundled in CodeKit. I'll try to do that tonight.
That would be awesome, but I am confused because the version of Uglify used by CodeKit seems to be more recent than the versions of Uglify with the bug I linked.
I can confirm the latest version of Uglify (2.7.3) mangles with no Safari errors.
I just updated to CodeKit 3.0.3 and can confirm that this is still an issue.
Mmm... 3.0.3 has Uglify 2.7.3. If there's still a problem, please provide an exact example and files to reproduce. Those will likely need to go to the Uglify team.
Yes, you are right. My apologies. The error I am seeing now has to do with a prepended library that is misusing "delete".
What threw me off is when I mangle and compress using uglify via terminal, "strict mode" is not prepended to my output file, but when using CodeKit's uglify, it is. Do you know why this would be?
I am prepending 6 or 7 vendor libraries to my js file using CodeKit's in-file prepends—minifying the resulting js with CodeKit.
I'm seeing this error in Safari—preventing the page from fully loading:
app.min.js:5SyntaxError: Cannot declare a parameter named 'i' as it shadows the name of a strict mode function.
I'm pretty sure this is the same issue documented here: mishoo/UglifyJS2#179
It appears this was fixed in an earlier version of Uglify than what I see is being used in CodeKit's about page - Uglify 2.6.2
So, I am not really sure what the problem is, actually.
As a temporary solution, is there any way I can set this to avoid using specific vars when minifying (while still minifying)?
I'm currently using CodeKit version 2.8 (19127)