mirror of
https://github.com/supabase/supabase.git
synced 2026-05-06 08:56:46 -04:00
f1a48f8c50
Only wrap with `withSentryConfig` when running on Vercel (`VERCEL === '1'`), matching the existing pattern used for HSTS headers on line 510. The Sentry webpack plugin's `runAfterProductionCompile` step adds ~24s to local production builds for source map upload that isn't needed outside of deployments. **Changed:** - Gate `withSentryConfig` on `process.env.VERCEL === '1'` in addition to `NEXT_PUBLIC_IS_PLATFORM === 'true'` ## To test - Run `pnpm build:studio` locally with `NEXT_PUBLIC_IS_PLATFORM=true` – confirm no `runAfterProductionCompile` step - Verify Vercel preview deploys still upload source maps to Sentry <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Refined configuration so error-tracking is enabled only in the designated deployment environment (adds an additional environment check). * Adjusted build-tooling to be conditionally enabled on the platform flag, and ensured non-tracked builds export the platform-aware configuration consistently. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>