Peter Wilson
Peter Wilson

Reputation: 4319

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!

Upvotes: 5

Views: 123

Answers (2)

Arvin
Arvin

Reputation: 594

Webpack is awesome tool. Gulp would also do the job.

Upvotes: 0

Piyush.kapoor
Piyush.kapoor

Reputation: 6803

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

Upvotes: 4

Related Questions