mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(frontend): Sentry sourcemaps...
This commit is contained in:
@@ -54,8 +54,13 @@ export default isDevelopmentBuild
|
||||
NEXT_PUBLIC_VERCEL_ENV: process.env.VERCEL_ENV,
|
||||
},
|
||||
|
||||
// Only print logs for uploading source maps in CI
|
||||
silent: !process.env.CI,
|
||||
// Enable debug logging if SENTRY_LOG_LEVEL is set to debug
|
||||
// This helps troubleshoot sourcemap upload issues
|
||||
debug: process.env.SENTRY_LOG_LEVEL === "debug",
|
||||
|
||||
// Show logs in CI/Vercel builds to help debug sourcemap upload issues
|
||||
// Set silent to false to see upload progress and any errors
|
||||
silent: !process.env.CI && process.env.SENTRY_LOG_LEVEL !== "debug",
|
||||
|
||||
// For all available options, see:
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
|
||||
@@ -83,9 +88,15 @@ export default isDevelopmentBuild
|
||||
disable: false, // Source maps are enabled by default
|
||||
assets: ["**/*.js", "**/*.js.map"], // Specify which files to upload
|
||||
ignore: ["**/node_modules/**"], // Files to exclude
|
||||
deleteSourcemapsAfterUpload: true, // Security: delete after upload
|
||||
// Keep sourcemaps available for browser debugging (source is public anyway)
|
||||
deleteSourcemapsAfterUpload: false,
|
||||
},
|
||||
|
||||
// For monorepo: explicitly set the URL prefix where files will be served
|
||||
// Next.js serves static files from /_next/static/ regardless of monorepo structure
|
||||
// This ensures Sentry can correctly map sourcemaps to the served files
|
||||
urlPrefix: "~/_next/static",
|
||||
|
||||
// Automatically tree-shake Sentry logger statements to reduce bundle size
|
||||
disableLogger: true,
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
"use client";
|
||||
|
||||
import { useSupabase } from "@/lib/supabase/hooks/useSupabase";
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
import { LDProvider } from "launchdarkly-react-client-sdk";
|
||||
import type { ReactNode } from "react";
|
||||
import { useMemo } from "react";
|
||||
import { useSupabase } from "@/lib/supabase/hooks/useSupabase";
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
import { environment } from "../environment";
|
||||
|
||||
const clientId = process.env.NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_ID;
|
||||
|
||||
Reference in New Issue
Block a user