esmangle
esmangle copied to clipboard
Prevent function constructors from being mangled
When optimizing some code sent to the browser with browserify, I expose a constructor function as Message, but when I evaluate the generated code, I see that Message: function b(d), so I lose the constructor name, so I cannot see the correct object types once instanciated.
Is there a way to keep constructor function unmangled?
I thoight this was a duplicate, but apparently it's not... You should add a property yourself to keep track of the name, I think.
Well, could there be some way to pass an option to specify reserved function names that should not be mangled?