Closed ntilwalli closed 7 years ago
It was written that way intentionally, why do you feel it should be changed?
I'm using rollup to bundle my app dependencies and commonjs-rollup-plugin errors with unexpected token errors when the code has the current style. With the proposed style rollup has no issues.
I actually had never seen that style before and when I tried a simple IIFE example which places the function call parens immediately after the closing brace both node and chrome error out. Is there a reason you chose that style?
Correction: the current style works in chrome and node. I tested function () {}()
when I should have tested (function() {}())
.
I'll withdraw. This qualifies as a commonjs-rollup-plugin
issue.
Yes, there's no issue with that. It might be related to some micro-optimization idea, that emerged recently. Still I don't believe it can bring any noticeable gain (even when speaking of single milliseconds)
I noticed these IIFE typos while trying to bundle this library using rollup.