Hacker News new | comments | show | ask | jobs | submit login

It is a bug on JSMin. Minifying should never alter code behaviour.



The minification isn't breaking the code. The authors had an incorrect expectation of how JSMin would minify the code. By the very act of minifying code where new lines matter your are always potentially changing the behavior.


The minification is breaking the code. If a minifier takes valid JS in and produces JS that behaves differently from the input, then that minifier is broken, full stop. It doesn't matter how anyone personally feels about ASI; what matters is that ASI is a part of JS, so if you're making a tool that processes JS, you need to respect its rules.


[deleted]


So you think it's ok for a minifier to break working code? Please explain.


Read the bit about TC39. "This code will break in the future." There's no point in patching the minifier to support this when the patch will have to be reverted pretty soon anyway.


It's working by chance.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: