appbaseio / appbaseio/appbase-js

Optimize build size

Aperta
#27 0 commenti 0 reazioni 1 assegnatario Rivendicata da @metagrover Vedi su GitHub
enhancement
Lingua principale
JavaScript
Stelle
42
Fork
16
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Current build size for a minified version of the library comes to 200KB (~500 KB without minification), GZipped version is ~60KB.

![](https://i.imgur.com/rRuR4NW.png)

These are the optimization points for reducing bloat from the library:

1. **babel-pollyfill** contributes ~200KB raw size, or 40% of the size. This can be stripped out in a lite version of the library aimed at native platforms or modern browsers (which have 97% support of ES6 spec).
2. Use tree shaking / rollup to remove other unused parts of the dependency tree. This comes with no sacrifice and *should* be done.
3. *url* package (23KB raw) is just used for a parse function. A lightweight alternative can be used for this.
4. Analyze the rest of the lib dependencies for possible optimizations.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.