browserify / browserify/node-util
Inconsistent behaviour with node inherits
オープン
- 主要言語
- JavaScript
- スター
- 255
- フォーク
- 92
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、Node 5.4 上および webpack でバンドルした後に、MyClass/EventEmitter の継承スニペットで問題を再現します。両方の環境で結果として得られる MyClass のプロトタイプを比較します。継承した EventEmitter のメソッドと併せて、カスタムの foo メソッドが引き続き利用可能であれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js, webpack
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100