Openstatus www.openstatus.dev
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 78 lines 2.3 kB view raw
1import { withSentryConfig } from "@sentry/nextjs"; 2 3import type { NextConfig } from "next"; 4 5const nextConfig: NextConfig = { 6 output: process.env.SELF_HOST === "true" ? "standalone" : undefined, 7 experimental: { 8 authInterrupts: true, 9 }, 10 images: { 11 remotePatterns: [ 12 new URL("https://openstatus.dev/**"), 13 new URL("https://**.public.blob.vercel-storage.com/**"), 14 ], 15 }, 16 logging: { 17 fetches: { 18 fullUrl: true, 19 }, 20 }, 21 async rewrites() { 22 return { 23 beforeFiles: [ 24 { 25 source: 26 "/:path((?!api|assets|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)", 27 has: [ 28 { 29 type: "host", 30 value: 31 process.env.NODE_ENV === "production" 32 ? "(?<subdomain>[^.]+).stpg.dev" 33 : "(?<subdomain>[^.]+).localhost", 34 }, 35 ], 36 missing: [ 37 // Skip this rewrite when the request came via proxy from web app 38 { 39 type: "header", 40 key: "x-proxy", 41 value: "1", 42 }, 43 { 44 type: "host", 45 value: 46 process.env.NODE_ENV === "production" 47 ? "www.stpg.dev" 48 : "localhost", 49 }, 50 ], 51 destination: "/:subdomain/:path*", 52 }, 53 ], 54 }; 55 }, 56}; 57 58// For detailed options, refer to the official documentation: 59// - Webpack plugin options: https://github.com/getsentry/sentry-webpack-plugin#options 60// - Next.js Sentry setup guide: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ 61const sentryConfig = { 62 // Prevent log output unless running in a CI environment (helps reduce noise in logs) 63 silent: !process.env.CI, 64 org: "openstatus", 65 project: "openstatus", 66 authToken: process.env.SENTRY_AUTH_TOKEN, 67 68 // Upload a larger set of source maps for improved stack trace accuracy (increases build time) 69 widenClientFileUpload: true, 70 71 // If set to true, transpiles Sentry SDK to be compatible with IE11 (increases bundle size) 72 transpileClientSDK: false, 73 74 // Tree-shake Sentry logger statements to reduce bundle size 75 disableLogger: true, 76}; 77 78export default withSentryConfig(nextConfig, sentryConfig);