Yii2 is too heavy for API project

I’m starting an API project with Yii 2. But sometime along the way, I found out that Yii 2 is really heavy with all the static stuffs (jQuery, bower, jui, etc.) built in, which are not needed in an API project at all. So I’m wondering is there a way to make Yii 2 more lightweight, or be more specific, remove all the static stuffs?

Remove the vendor folders for those extensions you don’t need?

Why? These aren’t used in any way since Yii uses lazy loading approach.