Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular App performance with one script file vs many script files

I am working on large scale web app using AngularJs as front-end and Laravel RESTful API as back-end

Currently I am using gulp to concatenate all script files in one file including angular libraries and all modules and controllers and it's about 46,000 line of code.

Is this a good approach regrading performance?, or I've to include all script files separately.

Also Is concatenating some files and including the others is a good approach?

Thanks in advance!

like image 759
Peter Wilson Avatar asked Jun 27 '16 07:06

Peter Wilson


1 Answers

Yes it is a standard approach for production

For development keep seperate files so debugging is a lot easier. For production it is highly advisable to combine all the files and minify it.

Infact if you use webpack you can have all css , js files in one bundle

like image 168
Piyush.kapoor Avatar answered Oct 18 '22 01:10

Piyush.kapoor