We recently started pulling TreeHook in production bundle for the sake of the Fiber stacks in error boundaries, but as @trueadm observed, this breaks the UMD bundle.
We could remove the __DEV__ gate there, but it's still bad to pull the whole hook into the prod bundle when we only use a small part of it in Fiber.
I think we should separate what we need in dev and prod, and not pull extra code into the prod bundle.
Linked: #9096