Ionic build for production - Why are there so many files? How to combine to 1 file?


I want to deploy the www folder but there are too many files.

Does the app need all the JS files that are found there? Which files can be deleted?

Also how to combine all the files to 1 main JS file?

yes you definitely need those files.


So how do I combine all?

P.S: Thanks for always answering.

There is a particular reason why you want to make one big file? I guess you should leave them like this and let your app handle them

First of all for a performance issue: you load only the things you need when you need them otherwise you will load a big file all the times even if you are using only a small portion of that code

What if I have created something that only has an input and a button and that’s it. Now, there are hundreds of files for no reason at all. I want all to be loaded at once.

in that case, you don’t need a framework like ionic :smiley: don’t you?
Is like killing a mosquito with a bazooka.

anyway you could to that tweaking your configuration files, etc.
Honestly I don’t know what to set or modify

try reading here: