`wp-scripts` has shipped something similar a while back and core has a helper function for it: https://github.com/WordPress/gutenberg/tree/trunk/packages/scripts#build-blocks-manifest We should really make our tooling support this so we don't do the glob / json read on every single request.