TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Why this bloat in Angular?

8 pointsby avighnayover 6 years ago
Why does each raw skeletal app generated by Angular need 240Mb of disk space and contains around 32 thousand files 239Mb in the node_modules folder.<p>If Angular is already global, why does it need all these files? And what are they doing?<p>Disclaimer: I am an old timer and really miss the just &#x27;download and unzip&#x27; days of javascript and open source

7 comments

quantummkvover 6 years ago
It mostly boils down to the fact that javascript&#x2F;nodejs does not ship with a standard library like every other language does. So every project has to include its own copy of what passes as the standard library (A random smattering of npm modules).<p>A casual peek into your node_modules folder will reveal packages such as left-pad, is-number, is-array etc. Stuff that is pre packaged into the runtime of any sane language. That&#x27;s what makes up most of the bulk in any nodejs project.
superasnover 6 years ago
It&#x27;s just how it is. You would find this article particularly insightful (1). An excerpt from it:<p>&gt; It’s true. Each installation of Babel includes a picture of Guy Fieri, and there is nothing you can do about it.<p>(1) <a href="https:&#x2F;&#x2F;medium.com&#x2F;@jdan&#x2F;i-peeked-into-my-node-modules-directory-and-you-wont-believe-what-happened-next-b89f63d21558" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@jdan&#x2F;i-peeked-into-my-node-modules-direc...</a>
评论 #17876470 未加载
romanovcodeover 6 years ago
It&#x27;s not related to Angular, it&#x27;s just how modern frontend works now. Also when you build it with production it won&#x27;t be 240mb. Remember that it loads all dependencies as well as many build dependencies.<p>In fact Angular team is working on new view engine (ngIvy) that shown to tree-shaken &quot;Hello World&quot; angular application down to 2.6kb.<p>IMO your reasoning for complaining is ridiculous, it&#x27;s like saying &quot;I hate C#, why do I need to download 6gb Visual Studio that has 64 thousand files in &quot;Program Files&#x2F;Visual Studio&quot; folder to build C# application!&quot;.
avighnayover 6 years ago
Found this article on setting up Angular with minimal dependencies<p><a href="https:&#x2F;&#x2F;blog.angularindepth.com&#x2F;setting-up-angular-from-scratch-1f518c65d8ab" rel="nofollow">https:&#x2F;&#x2F;blog.angularindepth.com&#x2F;setting-up-angular-from-scra...</a><p>[edit] this does not work well with Angular 6 and also it reduces dependencies only to 100Mb
avighnayover 6 years ago
This article echoes what I felt and here it is compared against Angular 1 itself<p><a href="https:&#x2F;&#x2F;medium.com&#x2F;dirtyjs&#x2F;why-angular-2-4-5-6-sucks-afb36567ad68" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;dirtyjs&#x2F;why-angular-2-4-5-6-sucks-afb3656...</a>
评论 #17884178 未加载
fiivover 6 years ago
You&#x27;re likely seeing a lot of the build tooling. Things to convert (from Typescript&#x2F;etc to plain JS), bundle (optimised files for prod) and run the dev environment (static file serving, possibly from memory and not disk, not sure off the top of my head).
评论 #17875683 未加载
muzaniover 6 years ago
Because it appeals to the demographic who uses it. Power at the cost of size and weight.<p>If you care a lot about size, you could use something like Vue.