browserify / browserify/tinyify

Function name shortened, but not function call

オープン
#25 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
JavaScript
スター
405
フォーク
14
PR マージ指標
30日以内にマージされた PR はありません

説明

There seems to be a problem with shortening names in some cases. Below is an example.

```js
{
addOnclick: function(){
element.onclick = ()=>{this.foo("some string")};
},

foo: function(str){
//do things
}
}
```

I get: "this.foo is not a function"
What it looks like is happening is that it is changing the name of the function, but it is not changing the call to that function. It seems to do this everywhere that I have this format as far as I can tell. It works with browserify of course, but it breaks with tinyify.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Issue の JavaScript の例から始めて、tinyify を通して再現し、出力を browserify と比較します。名前短縮の経路を追跡し、短縮された関数名とその呼び出しが一貫して変更されることを確認します。完了の条件は、その例で "this.foo is not a function" が発生しなくなることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
build-system, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。