node-util icon indicating copy to clipboard operation
node-util copied to clipboard

Inconsistent behaviour with node inherits

Open fed135 opened this issue 9 years ago • 0 comments

I have a node class that inherits Event emitter:

function MyClass() {
    EventEmitter.call(this);
}
util.inherits(MyClass, EventEmitter);

This class also has it's prototype object with methods:

MyClass.prototype.foo = function() {};

When I run my code on node (5.4) everything runs smoothly, but once webpack'ed the MyClass prototype gets squashed and only the EventEmitter methods survive.

fed135 avatar Apr 14 '16 02:04 fed135