Uglifyjs: Output is different when generated using CLI and programmatically.

Created on 24 Mar 2017  路  7Comments  路  Source: mishoo/UglifyJS

  • Bug report or feature request?
    Bug report.
  • uglify-js version (uglifyjs -V)
    2.8.14
  • JavaScript input - ideally as small as possible.
    var result = uglifyJS.minify( [ distUwpNextAppJsFilePath ] ); fs.writeFileSync( distUwpNextAppJsFilePath, result.code );
  • The uglifyjs CLI command executed or minify() options used.
    uglifyjs theSameFile > theSameFile2
  • An example of JavaScript output produced and/or the error or warning.

Note: the release version of uglify-js only supports ES5. Those wishing to minify ES6 should use the experimental harmony branch.

question

All 7 comments

minify() enables compress and mangle by default.

To get the same effect from the CLI use:

uglifyjs theSameFile -m -c

@alexlamsl We should wrap an HTML comment around this line in the Issue template:

Note: the release version of uglify-js only supports ES5. Those wishing to minify ES6 should use the experimental harmony branch.

<!-- 
    Note: the release version of uglify-js only supports ES5. Those wishing 
    to minify ES6 should use the experimental harmony branch. 
-->

Also should change this line:

* Bug report or feature request?

to

* Bug report or feature request? <!-- Note: suboptimal but correct code is not a bug -->

Should we put the following at the start of the Issue template?

<!-- Fill out all sections. Issues not following this template will be closed. -->

I'd prefer to keep that as a gentlemen's agreement, if that's alright with you. 馃槄

Alright. You're much nicer than I am.

Alright. You're much nicer than I am.

I believe you are referring to the person who has access to the _Close Issue_ button. 馃懟

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrismanley picture chrismanley  路  5Comments

neverfox picture neverfox  路  4Comments

pvdz picture pvdz  路  3Comments

PinkyJie picture PinkyJie  路  3Comments

Havunen picture Havunen  路  5Comments