Ville Lautanala

Results 29 comments of Ville Lautanala

Uglifier has `ascii_only` output option, but it is set to true by default since 2.5.0. If you run into invalid output, it might be worth checking if UglifyJS produces similar...

UglifyJS seems to return something unexpected when used in combination with harmony option. I'm not entirely sure why, and while handling the error better is easy, the new message is...

What does your output look like if you don't have Uglifier enabled? The error message points to there being non-ES5 syntax in the output. As you guessed, the default sprockets...

In 3.2.0, ES6 support can be enabled with `harmony: true` option. Unfortunately this does not yet include async/await. The progress for that can be followed at https://github.com/mishoo/UglifyJS2/issues/1789

Thanks for reporting. That wasn't intentional, I'll fix the default.

Fixed in https://github.com/lautis/uglifier/commit/50e8620daf75e5913a1f2336b5b274c4d07517ef, released as 3.1.3.

@deepfryed could you post a more complete example? When I try to reproduce the example, for loop seems to be left as-is.

Thanks. Indeed a bug in UglifyJS. The same reproduces with `curl https://raw.githubusercontent.com/babyzone2004/tank/master/box2d/src/Box2dweb.js | uglifyjs -c passes=2 -m > box2dweb.min.js`. Running UglifyJS twice does not lead to the corruption, though.

Are the files identical/have same fingerprints if you skip Uglifier on deploy? To my understanding UglifyJS should be deterministic, and that also applies to Uglifier. When I re-ran the (compressed)...

Uglifier doesn't have an option to write to a file directly, but you can get source map as a separate string. ```ruby minified, map = Uglifier.compile_with_map(source) ``` Source maps should...