UglifyJS also strips the parenthesis of an constructor with empty arguments.
Chrome cannot parse the minified file if:
- there is a constructor with empty arguments is the last command in a js file and
- the next file to concatenate starts with a
(
example1.js:
// A lot of code...
var foo = new Foo(); // last line
example2.js
(function() { // first line
// A lot code...
example1.min.js' (by UglifyJS)
example2.min.js (by UglifyJS)
example1.min.js and example2.min.js concatinated
var e=new Foo
(function(){
or (formated by chrome)
var e=new Foo(function(){
which is problematic.