Returns true if the current build is a production build, false otherwise.
Vite substitutes import.meta.env.PROD with true in the shipped, Vite-bundled core package (and
leaves it false in Vite dev). Outside a Vite build — the initial tsc pass and web-test-runner —
import.meta.env is undefined, so the guard returns false there.
Returns true if the current build is a production build, false otherwise.
Vite substitutes
import.meta.env.PRODwithtruein the shipped, Vite-bundled core package (and leaves itfalsein Vite dev). Outside a Vite build — the initialtscpass and web-test-runner —import.meta.envis undefined, so the guard returns false there.