Stripping Yii2 for Deployment

I was looking at yii2 folder and its really big something like 200+ for vendors alone

Its easy to find a way to scrap kartik-v which is 37MB and not in attached image but am interested with reducing Yii size.





  1. Use --prefer-dist and --no-dev.

  2. Remove packages you don’t need.

Whats that supposed to do?

what effect does it have to my current installation?

You mean manually delete or remove from composer.js?

For example how do I remove punycode?

I appreciate your reply!

  1. –prefer-dist and --no-dev won’t fetch packages from require-dev section of composer.json. Also packages fetched won’t have .git repository files with them.

  2. Remove from composer.json and the run composer update.

Thanks samdark!