5 ms·
Hope this comment stays at the top before all the "wow JS sucks!!!" people arrive :-) Though to be fair a "modern" JS dev environment does use a ton of stuff!
by sotojuan 10y ago
Hope this comment stays at the top before all the "wow JS sucks!!!" people arrive :-) Though to be fair a "modern" JS dev environment does use a ton of stuff!
IIRC Angular 2 production builds are actually pretty efficient.
- merb 10y ago> Though to be fair a "modern" JS dev environment does use a ton of stuff! Though to be fair a "modern" JS dev environment does use a ton of unnecessary stuff! I fixed your comment.
- sotojuan 10y agoEh, transpiling ES2015+ to ES5 is not unnecessary if it makes you more productive—Babel is just really big.
- Klathmon 10y agoWell to be fair, does anyone expect a compiler to be small?
- sotojuan 10y agohttps://gitlab.com/Rich-Harris/buble https://gitlab.com/Rich-Harris/buble Buble says "Files (940 KB)" but it doesn't do everything Babel does (just a strict subset).
- Klathmon 10y agoI know that it's possible, but what's the purpose? Is anyone's quality of life really impacted by the size of babel vs buble? Does the size of a compiler really change anything for the average developer (obviously within reason)?
- sotojuan 10y agoI personally don't care but I've had super long install times when using slow internet—which in many parts of the world is the standard speed. I'll keep using Babel, but I like that there are alternatives that install faster if need be.
- Klathmon 10y agoI agree. Also there are multiple ways that you can install these things. The "recommended" way is to install babel for each project independently. Space is cheap, internet speeds are fast for many, and avoiding version issues outweighs the savings. But you can install globally, so you'd install babel once and can use it in all projects that way. Then throw in the possibility of different package managers and you get a crazy amount of freedom and choice. People get overwhelmed with "javascript fatigue" and I just don't get it. You don't need to do everything, but having the option to is amazing.
- pfooti 10y agoI believe NPM also caches your file locally. So the second install of babel would 304 from GitHub and get pulled from your local cache, saving time and bandwidth.
- Akkuma 10y agoBuble's purpose is that it is supposed to be significantly faster to compile from ES6 to ES5 with minimal configuration, since it actually does things out of the box.
- Klathmon 10y agoBut that has nothing to do with it's size. If Buble was 10% larger than Babel it would still solve it's purpose.
- Touche 10y agoThat's right, Buble's secret sauce to being fast is that is skips the code generation step, not because of the number of dependencies. Although there definitely is a performance cost to Babel's large dep tree as each of these modules have to be found by Node (which is inefficient). If you use Babel with npm2 it is super slow, because npm2's folder structure causes more lookups.
- Svenskunganka 10y agoIIRC the Angular2 production builds are the largest among all the frameworks. If you add the router it sits just shy of a meg - and that's just the dependencies. Not sure if they've started working on bringing the size down yet, but there are 1KB alternatives[1] for those who cares about their users. [1] - http://monkberry.js.org/ http://monkberry.js.org/
- vbernat 10y agoThis website froze my Firefox running on an i7 CPU due to the animated background.
- emodendroket 10y agoI'm not sure the right conclusion here is "oh, well then that is reasonable."