ionic-team / ionic-team/ionicons
Lighthouse Issues And Legacy JavaScript In Codebase
- Lingua principale
- TypeScript
- Stelle
- 18.2k
- Fork
- 2.1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### Current Behavior
The Below Functions On Line 15 Of The CDN Delivered Version Of Ionicons Are Considered As _Legacy_ Function And **Should Be Updated** Ideally ( **Yes Its Version 7.1.0** )
* Array.prototype.fill
* Array.prototype.filter
* Array.prototype.find
* Array.prototype.findIndex
* Array.prototype.forEach
* Array.from
* Array.prototype.map
* Array.prototype.some
* Number.isInteger
* Number.isSafeInteger
* Object.entries
* Object.freeze
* Object.getOwnPropertyDescriptors
* Object.getPrototypeOf
* Object.isExtensible
* Object.isFrozen
* Object.isSealed
* Object.keys
* Object.preventExtensions
* Object.seal
* Object.values
* String.prototype.codePointAt
* String.fromCodePoint
* String.raw
* String.prototype.repeat
### Expected Behavior
The Above Mentioned Methods Should Ideally Be In The More Modern Version Of Themselves So That We Can Potentially Save **23.0 KiB** ( As Per Lighthouse ) On The Size Of The Package And It Should Result In Better Compatibility On Modern Browsers
### For Example
**Array.prototype.map** Can Be Changes To Well **array.map()**
And Much More
### Steps to Reproduce
https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.esm.js
https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.js
Just Import Them In A Good Enough HTML Page That Can Be **Recognised By Lighthouse** And Run The Test Then View The Performance Section For This Issue It Will Be Displayed There With Potential Suggestions As Well
### Code Reproduction URL
https://gist.github.com/myselfgautham/5ee7d88dce240c245796c6a7b380dd4f
### Additional Information
They Are An Easy Fix They Require Changing Existing Legacy Methods To Their Modern Counterparts. For Your Information This Was Spotted Since Chrome Version _125.0.6422.60 ( 64Bit )_. I Will Try To Look Into It If I Can And If Time Is Available
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.