Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behaviour with node inherits #14

Open
fed135 opened this issue Apr 14, 2016 · 0 comments
Open

Inconsistent behaviour with node inherits #14

fed135 opened this issue Apr 14, 2016 · 0 comments

Comments

@fed135
Copy link

fed135 commented Apr 14, 2016

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 fed135 changed the title Inconsistent behaviour with node inherit Inconsistent behaviour with node inherits Apr 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant