[英]How to tell Google Closure Compiler in simple mode that particular function name could be compressed?
Google Closure Compiler使用ADVANCED_OPTIMIZATIONS選項實現了此功能,但由於使用jQuery,因此無法使用。 因此,我必須使用SIMPLE_OPTIMIZATIONS,但是我想壓縮某些函數的名稱。
function myLongFunctionName(response) {
// do something here
}
myLongFunctionName(text);
我行有myLongFunctionName
變為a
(或任何使用Closure Compiler選擇)。 但是我沒有看到任何注釋 ,它可以幫助我。 我該怎么辦?
如果函數是本地函數,則Google Closure Compiler重命名它。 我已將代碼移入
(function(){
function myLongFunctionName(response) {
// do something here
}
myLongFunctionName(text);
})()
結果,它也被壓縮。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.