Elkin
Elkin

Reputation: 900

How to reduce Angular2 project size?

I am new to Angular 2 and I have never used Angular 1.

I have been trying this tutorial https://angular.io/guide/quickstart and I would like to know if there is any way of reducing the project size because its size gets big after installing dependencies with 'npm install' (more than 100Mb).

I have asked a similar question but not exactly here:
Are all dependencies recommneded by angular2 quickstart really nescessary?

Upvotes: 0

Views: 1741

Answers (2)

Madhu Ranjan
Madhu Ranjan

Reputation: 17944

npm based applications are usually large. And Angular 2 uses lot of npm packages which in turn depend upon other packages hence the size is tool large. However you may right gulp tasks or if you are using angular-cli you may use ng serve -prod which can bundle all the dependencies in single file so the the distributed package will be very less in size.

so the large size is only while development.

Upvotes: 2

Bean0341
Bean0341

Reputation: 1697

Looks like these guys found a blog that helps with "tree shaking" or reducing application size. see Angular 2: Reduce app size (in addition to bundling/minification) and look at the comments.

Upvotes: 2

Related Questions