Skip to content

Having a constructor with empty arguments in the last line will cause concatenation problems. #21

@flixx

Description

@flixx

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)

var e=new Foo

example2.min.js (by UglifyJS)

(function(){

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions