https://github.com/hugo-toha/toha/blob/aa7bdb089991efc7537980942f5376269ca3170d/layouts/partials/helpers/get-esbuild-options.html#L139
Hugo.isProduction would only return true if environment is production. Unfortunately this breaks when the environment is staging which is production like. This causes the generated js to be huge in size causing the deployment to fail due to Cloudflare page limit.
Perhaps use a different variable like HUGO_THEME_ENV ?
https://github.com/hugo-toha/toha/blob/aa7bdb089991efc7537980942f5376269ca3170d/layouts/partials/helpers/get-esbuild-options.html#L139
Hugo.isProduction would only return true if environment is production. Unfortunately this breaks when the environment is staging which is production like. This causes the generated js to be huge in size causing the deployment to fail due to Cloudflare page limit.
Perhaps use a different variable like HUGO_THEME_ENV ?