Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
2.7 kB ยท 85 lines
TypeScript
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586import { withSentryConfig } from "@sentry/nextjs";import type { NextConfig } from "next";
// ICON_SET=nucleo swaps the icon set at resolution time (see packages/icons)const useNucleoIcons = process.env.ICON_SET === "nucleo";
const nextConfig: NextConfig = { output: process.env.SELF_HOST === "true" ? "standalone" : undefined, experimental: { // barrel-optimize only when unaliased โ the rewrite would bypass the nucleo alias optimizePackageImports: useNucleoIcons ? [] : ["@openstatus/icons"], // dashboard routes are dynamic (auth/cookies); default dynamic staleTime of 0 // discards prefetched entries on navigation, so keep them 30s to make prefetch pay off staleTimes: { dynamic: 30, }, }, turbopack: useNucleoIcons ? { resolveAlias: { "@openstatus/icons": "@openstatus/icons/nucleo" } } : undefined, webpack: (config) => { if (useNucleoIcons) { config.resolve.alias["@openstatus/icons$"] = "@openstatus/icons/nucleo"; } return config; }, images: { remotePatterns: [ new URL("https://openstatus.dev/**"), new URL("https://**.public.blob.vercel-storage.com/**"), new URL("https://www.openstatus.dev/**"), ], }, logging: { fetches: { fullUrl: true, }, }, // moved under /settings โ keep old links working async redirects() { return [ { source: "/", destination: "/overview", permanent: false, }, { source: "/private-locations", destination: "/settings/private-locations", permanent: false, }, { source: "/audit-logs", destination: "/settings/audit-logs", permanent: false, }, ]; },};
// For detailed options, refer to the official documentation:// - Webpack plugin options: https://github.com/getsentry/sentry-webpack-plugin#options// - Next.js Sentry setup guide: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/const sentryConfig = { // Prevent log output unless running in a CI environment (helps reduce noise in logs) silent: !process.env.CI, org: "openstatus", project: "openstatus", authToken: process.env.SENTRY_AUTH_TOKEN,
// Upload a larger set of source maps for improved stack trace accuracy (increases build time) widenClientFileUpload: true,
// If set to true, transpiles Sentry SDK to be compatible with IE11 (increases bundle size) transpileClientSDK: false,
// Tree-shake Sentry logger statements to reduce bundle size webpack: { treeshake: { removeDebugLogging: true, }, },};
export default withSentryConfig(nextConfig, sentryConfig);