Compression of JS/CSS

Hi,
In our project, after the build is created the weightage of the “main.js” is approx to 4.5 MB. But when the same is minified using online tools, its coming to 1.5 MB. Is there anyway, this reduction to 1.5 MB is possible during the ionic serve.

Please sug.

Regards.

No.

If Ionic did that, everybody would complain about how long it took to build. You have to accept that build speed and binary size are conflicting goals, and accept trade-offs for one or the other depending on the deployment case.

ionic serve is meant for local debugging, not depoyment - so size is not really an issue.

How big is your main.js when running npm run build --prod?