Skip to content

Inconsistent behaviour with node inherits #14

Open
@fed135

Description

@fed135

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.

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