Reduce Carbon Fields vendor folder size

Con Schneider

Con Schneider

I recently used the excellent Carbon Fields for building WordPress settings (hat tip to this super useful blog post).

I enjoyed using Carbon Fields very much. The framework is well documented and really easy to use. While I was working I also extended the carbon icon field with Icomoon assets.

One challenge you face at the end is that the vendor folder of carbon fields is pretty big. This issue has been discussed here: https://github.com/htmlburger/carbon-fields/issues/652

Here is my list of files that I deleted to reduce the carbon fields folder to 3.4 MB:

  • /vendor/htmlburger/carbon-fields/build – remove all non .min files.
  • /packages/blocks – can be removed if no Gutenberg fields are used.
  • /build/gutenberg – can be removed if no Gutenberg fields are used.
  • /languages – remove all po mo.

Furthermore I used:

  • Daisydisk to quickly gauge file sizes.
  • Keka to zip my root folder.

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments

Scroll Up