mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
* Initial commit. * Minor type fixes. * Add a integration for Queues. Refactor some of the integration layout. * Migrate the Cron integration to the new style. * Add useInstalledIntegrations hook. * Add an integration entry for vault. * Add an integration entry for GraphiQL. * Add supabase webhooks. * Feat/integrations get layout (#30538) * scroll based icon * Update header.tsx * remove dep from overview * moar * more table stuff * moar * alt nav put in * fix MotionNumber issues * more * trying both layouts * Fix bunch of type errors. --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> * Migrate Vercel and Github files to their own folders. * Switch all integrations with the new designs. * More fixes for links, pages structure and other random stuff. * Remove unneeded file. * Another set of fixes. Migrated most of the extension integrations. * Migrated Vault and webhooks to the new style. * Various fixes to make the animation work. * Remove extra code. * Tiny fixes 😬 i swear its tiny * Refactor IntegrationOverviewTab * chore/ update integrations routes (#30585) * init * add child support in tabs * add webhooks * Update IntegrationPageHandler.tsx * fix id issues * use messageId instead * animation tweaks * Move the description to the wrappers array. * The useInstalledIntegrations now provides integrations which could be installed. * Add static content for the various integrations. * Move the page handler logic into the integrations definitions. * Clean up some extra code. * Add logic to make the overview tab the default tab. * Don't show the header until the integration id has been checked. * Add logic to the integration pages to avoid weird loading bugs, deselecting tabs if the integration hasn't been installed etc. * Fix the webhooks overview tab. * Fix the buttons for enabling extensions. * Add padding to all custom tab contents. * Small fixes * Prettier lint * Fix icon color + add empty state for when available integrations are all installed * Fix ts errors * Fiox * Add enable webhooks cta * Fix key * Fix all lints * Fix the queues create sheet. * Fix the deletion of wrappers. * Fix the minimum version alert for the wrappers extension. * Make the queues table fit the whole container. * Fix an issue which reset the tab when installing an extension. * Address comments * Add loading state for installed integrations in side nav * Fix edit secret not rendering value in input field after subsequent openings * Fix vault keys auto filling search input with vault * Fix search input placeholder for cron * Minor fix in install database extension copy * Fix a bad redirect when reloading. * Fix bad url redirects. * Fix scrolling in create new/edit wrapper sheet. * Add y padding to the wrappers rows. * Fix merge errors. * More merge fixes. * Fix bad imports during the merge. --------- Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
597 lines
19 KiB
JavaScript
597 lines
19 KiB
JavaScript
const { withSentryConfig } = require('@sentry/nextjs')
|
|
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
|
enabled: process.env.ANALYZE === 'true',
|
|
})
|
|
|
|
// Required for nextjs standalone build
|
|
const path = require('path')
|
|
|
|
const API_URL = process.env.NEXT_PUBLIC_API_URL
|
|
? new URL(process.env.NEXT_PUBLIC_API_URL).origin
|
|
: ''
|
|
const SUPABASE_URL = process.env.SUPABASE_URL ? new URL(process.env.SUPABASE_URL).origin : ''
|
|
const GOTRUE_URL = process.env.NEXT_PUBLIC_GOTRUE_URL
|
|
? new URL(process.env.NEXT_PUBLIC_GOTRUE_URL).origin
|
|
: ''
|
|
const SUPABASE_PROJECTS_URL = 'https://*.supabase.co'
|
|
const SUPABASE_PROJECTS_URL_WS = 'wss://*.supabase.co'
|
|
|
|
// construct the URL for the Websocket Local URLs
|
|
let SUPABASE_LOCAL_PROJECTS_URL_WS = ''
|
|
if (SUPABASE_URL) {
|
|
const url = new URL(SUPABASE_URL)
|
|
const wsUrl = `${url.hostname}:${url.port}`
|
|
SUPABASE_LOCAL_PROJECTS_URL_WS = `ws://${wsUrl} wss://${wsUrl}`
|
|
}
|
|
|
|
// Needed to test docs search in local dev
|
|
const SUPABASE_DOCS_PROJECT_URL = process.env.NEXT_PUBLIC_SUPABASE_URL
|
|
? new URL(process.env.NEXT_PUBLIC_SUPABASE_URL).origin
|
|
: ''
|
|
|
|
const SUPABASE_STAGING_PROJECTS_URL = 'https://*.supabase.red'
|
|
const SUPABASE_STAGING_PROJECTS_URL_WS = 'wss://*.supabase.red'
|
|
const SUPABASE_COM_URL = 'https://supabase.com'
|
|
const CLOUDFLARE_CDN_URL = 'https://cdnjs.cloudflare.com'
|
|
const HCAPTCHA_SUBDOMAINS_URL = 'https://*.hcaptcha.com'
|
|
const HCAPTCHA_ASSET_URL = 'https://newassets.hcaptcha.com'
|
|
const HCAPTCHA_JS_URL = 'https://js.hcaptcha.com'
|
|
const CONFIGCAT_URL = 'https://cdn-global.configcat.com'
|
|
const STRIPE_SUBDOMAINS_URL = 'https://*.stripe.com'
|
|
const STRIPE_JS_URL = 'https://js.stripe.com'
|
|
const STRIPE_NETWORK_URL = 'https://*.stripe.network'
|
|
const CLOUDFLARE_URL = 'https://www.cloudflare.com'
|
|
const ONE_ONE_ONE_ONE_URL = 'https://one.one.one.one'
|
|
const VERCEL_URL = 'https://vercel.com'
|
|
const VERCEL_INSIGHTS_URL = 'https://*.vercel-insights.com'
|
|
const GITHUB_API_URL = 'https://api.github.com'
|
|
const GITHUB_USER_CONTENT_URL = 'https://raw.githubusercontent.com'
|
|
const GITHUB_USER_AVATAR_URL = 'https://avatars.githubusercontent.com'
|
|
const GOOGLE_USER_AVATAR_URL = 'https://lh3.googleusercontent.com'
|
|
const VERCEL_LIVE_URL = 'https://vercel.live'
|
|
// used by vercel live preview
|
|
const PUSHER_URL = 'https://*.pusher.com'
|
|
const PUSHER_URL_WS = 'wss://*.pusher.com'
|
|
|
|
const DEFAULT_SRC_URLS = `${API_URL} ${SUPABASE_URL} ${GOTRUE_URL} ${SUPABASE_LOCAL_PROJECTS_URL_WS} ${SUPABASE_PROJECTS_URL} ${SUPABASE_PROJECTS_URL_WS} ${HCAPTCHA_SUBDOMAINS_URL} ${CONFIGCAT_URL} ${STRIPE_SUBDOMAINS_URL} ${STRIPE_NETWORK_URL} ${CLOUDFLARE_URL} ${ONE_ONE_ONE_ONE_URL} ${VERCEL_INSIGHTS_URL} ${GITHUB_API_URL} ${GITHUB_USER_CONTENT_URL}`
|
|
const SCRIPT_SRC_URLS = `${CLOUDFLARE_CDN_URL} ${HCAPTCHA_JS_URL} ${STRIPE_JS_URL}`
|
|
const FRAME_SRC_URLS = `${HCAPTCHA_ASSET_URL} ${STRIPE_JS_URL}`
|
|
const IMG_SRC_URLS = `${SUPABASE_URL} ${SUPABASE_COM_URL} ${SUPABASE_PROJECTS_URL} ${GITHUB_USER_AVATAR_URL} ${GOOGLE_USER_AVATAR_URL}`
|
|
const STYLE_SRC_URLS = `${CLOUDFLARE_CDN_URL}`
|
|
const FONT_SRC_URLS = `${CLOUDFLARE_CDN_URL}`
|
|
|
|
const csp = [
|
|
...(process.env.VERCEL_ENV === 'preview' ||
|
|
process.env.NEXT_PUBLIC_ENVIRONMENT === 'local' ||
|
|
process.env.NEXT_PUBLIC_ENVIRONMENT === 'staging'
|
|
? [
|
|
`default-src 'self' ${DEFAULT_SRC_URLS} ${SUPABASE_STAGING_PROJECTS_URL} ${SUPABASE_STAGING_PROJECTS_URL_WS} ${VERCEL_LIVE_URL} ${PUSHER_URL_WS} ${SUPABASE_DOCS_PROJECT_URL};`,
|
|
`script-src 'self' 'unsafe-eval' 'unsafe-inline' ${SCRIPT_SRC_URLS} ${VERCEL_LIVE_URL} ${PUSHER_URL};`,
|
|
`frame-src 'self' ${FRAME_SRC_URLS} ${VERCEL_LIVE_URL};`,
|
|
`img-src 'self' blob: data: ${IMG_SRC_URLS} ${SUPABASE_STAGING_PROJECTS_URL} ${VERCEL_URL};`,
|
|
`style-src 'self' 'unsafe-inline' ${STYLE_SRC_URLS} ${VERCEL_LIVE_URL};`,
|
|
`font-src 'self' ${FONT_SRC_URLS} ${VERCEL_LIVE_URL};`,
|
|
`worker-src 'self' blob: data:;`,
|
|
]
|
|
: [
|
|
`default-src 'self' ${DEFAULT_SRC_URLS} ${PUSHER_URL_WS};`,
|
|
`script-src 'self' 'unsafe-eval' 'unsafe-inline' ${SCRIPT_SRC_URLS} ${VERCEL_LIVE_URL} ${PUSHER_URL};`,
|
|
`frame-src 'self' ${FRAME_SRC_URLS} ${VERCEL_LIVE_URL};`,
|
|
`img-src 'self' blob: data: ${IMG_SRC_URLS} ;`,
|
|
`style-src 'self' 'unsafe-inline' ${STYLE_SRC_URLS} ${VERCEL_LIVE_URL};`,
|
|
`font-src 'self' ${FONT_SRC_URLS} ${VERCEL_LIVE_URL};`,
|
|
`worker-src 'self' blob: data:;`,
|
|
]),
|
|
`object-src 'none';`,
|
|
`base-uri 'self';`,
|
|
`form-action 'self';`,
|
|
`frame-ancestors 'none';`,
|
|
`block-all-mixed-content;`,
|
|
...(process.env.NEXT_PUBLIC_IS_PLATFORM === 'true' &&
|
|
process.env.NEXT_PUBLIC_ENVIRONMENT === 'prod'
|
|
? [`upgrade-insecure-requests;`]
|
|
: []),
|
|
].join(' ')
|
|
|
|
/**
|
|
* @type {import('next').NextConfig}
|
|
*/
|
|
const nextConfig = {
|
|
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
|
|
output: 'standalone',
|
|
experimental: {
|
|
webpackBuildWorker: true,
|
|
},
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: `/.well-known/vercel/flags`,
|
|
// TODO: Replace this with supabase.com/.well-known/vercel/flags once this PR is merged.
|
|
destination: `${process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : process.env.NEXT_PUBLIC_SITE_URL}${process.env.NEXT_PUBLIC_BASE_PATH}/.well-known/vercel/flags`,
|
|
basePath: false,
|
|
},
|
|
]
|
|
},
|
|
async redirects() {
|
|
return [
|
|
...(process.env.NEXT_PUBLIC_IS_PLATFORM === 'true'
|
|
? [
|
|
{
|
|
source: '/',
|
|
has: [
|
|
{
|
|
type: 'query',
|
|
key: 'next',
|
|
value: 'new-project',
|
|
},
|
|
],
|
|
destination: '/new/new-project',
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: '/',
|
|
destination: '/projects',
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: '/register',
|
|
destination: '/sign-up',
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: '/signup',
|
|
destination: '/sign-up',
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: '/signin',
|
|
destination: '/sign-in',
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: '/login',
|
|
destination: '/sign-in',
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: '/log-in',
|
|
destination: '/sign-in',
|
|
permanent: false,
|
|
},
|
|
]
|
|
: [
|
|
{
|
|
source: '/',
|
|
destination: '/project/default',
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: '/register',
|
|
destination: '/project/default',
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: '/signup',
|
|
destination: '/project/default',
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: '/signin',
|
|
destination: '/project/default',
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: '/login',
|
|
destination: '/project/default',
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: '/log-in',
|
|
destination: '/project/default',
|
|
permanent: false,
|
|
},
|
|
]),
|
|
{
|
|
source: '/project/:ref/auth',
|
|
destination: '/project/:ref/auth/users',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/database',
|
|
destination: '/project/:ref/database/tables',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/database/replication',
|
|
destination: '/project/:ref/database/publications',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/database/graphiql',
|
|
destination: '/project/:ref/api/graphiql',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/storage',
|
|
destination: '/project/:ref/storage/buckets',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/settings',
|
|
destination: '/project/:ref/settings/general',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/auth/settings',
|
|
destination: '/project/:ref/auth/users',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/settings/billing/subscription',
|
|
has: [
|
|
{
|
|
type: 'query',
|
|
key: 'panel',
|
|
value: 'subscriptionPlan',
|
|
},
|
|
],
|
|
destination: '/org/_/billing?panel=subscriptionPlan',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/settings/billing/subscription',
|
|
has: [
|
|
{
|
|
type: 'query',
|
|
key: 'panel',
|
|
value: 'pitr',
|
|
},
|
|
],
|
|
destination: '/project/:ref/settings/addons?panel=pitr',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/settings/billing/subscription',
|
|
has: [
|
|
{
|
|
type: 'query',
|
|
key: 'panel',
|
|
value: 'computeInstance',
|
|
},
|
|
],
|
|
destination: '/project/:ref/settings/addons?panel=computeInstance',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/settings/billing/subscription',
|
|
has: [
|
|
{
|
|
type: 'query',
|
|
key: 'panel',
|
|
value: 'customDomain',
|
|
},
|
|
],
|
|
destination: '/project/:ref/settings/addons?panel=customDomain',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/settings/billing/subscription',
|
|
destination: '/org/_/billing',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/database/api-logs',
|
|
destination: '/project/:ref/logs/edge-logs',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/database/postgres-logs',
|
|
destination: '/project/:ref/logs/postgres-logs',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/database/postgrest-logs',
|
|
destination: '/project/:ref/logs/postgrest-logs',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/database/pgbouncer-logs',
|
|
destination: '/project/:ref/logs/pooler-logs',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/logs/pgbouncer-logs',
|
|
destination: '/project/:ref/logs/pooler-logs',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/database/realtime-logs',
|
|
destination: '/project/:ref/logs/realtime-logs',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/storage/logs',
|
|
destination: '/project/:ref/logs/storage-logs',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/auth/logs',
|
|
destination: '/project/:ref/logs/auth-logs',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/logs-explorer',
|
|
destination: '/project/:ref/logs/explorer',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/sql/templates',
|
|
destination: '/project/:ref/sql',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/org/:slug/settings',
|
|
destination: '/org/:slug/general',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/settings/billing/update',
|
|
destination: '/org/_/billing',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/settings/billing/update/free',
|
|
destination: '/org/_/billing',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/settings/billing/update/pro',
|
|
destination: '/org/_/billing',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/settings/billing/update/team',
|
|
destination: '/org/_/billing',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/settings/billing/update/enterprise',
|
|
destination: '/org/_/billing',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/project/:ref/sql',
|
|
destination: '/project/:ref/sql/new',
|
|
permanent: true,
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/reports/linter',
|
|
destination: '/project/:ref/database/linter',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/reports/query-performance',
|
|
destination: '/project/:ref/advisors/query-performance',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/database/query-performance',
|
|
destination: '/project/:ref/advisors/query-performance',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/auth/column-privileges',
|
|
destination: '/project/:ref/database/column-privileges',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/database/linter',
|
|
destination: '/project/:ref/database/security-advisor',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/database/security-advisor',
|
|
destination: '/project/:ref/advisors/security',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/database/performance-advisor',
|
|
destination: '/project/:ref/advisors/performance',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/database/webhooks',
|
|
destination: '/project/:ref/integrations/webhooks',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/database/wrappers',
|
|
destination: '/project/:ref/integrations/wrappers',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/.....',
|
|
destination: '/project/:ref/integrations/cron-jobs',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/api/graphiql',
|
|
destination: '/project/:ref/integrations/graphiql',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/settings/vault/secrets',
|
|
destination: '/project/:ref/integrations/vault/secrets',
|
|
},
|
|
{
|
|
permanent: true,
|
|
source: '/project/:ref/settings/vault/keys',
|
|
destination: '/project/:ref/integrations/vault/keys',
|
|
},
|
|
...(process.env.NEXT_PUBLIC_BASE_PATH?.length
|
|
? [
|
|
{
|
|
source: '/',
|
|
destination: process.env.NEXT_PUBLIC_BASE_PATH,
|
|
basePath: false,
|
|
permanent: false,
|
|
},
|
|
]
|
|
: []),
|
|
]
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: '/(.*?)',
|
|
headers: [
|
|
{
|
|
key: 'X-Frame-Options',
|
|
value: 'DENY',
|
|
},
|
|
{
|
|
key: 'X-Content-Type-Options',
|
|
value: 'no-sniff',
|
|
},
|
|
{
|
|
key: 'Content-Security-Policy',
|
|
value: process.env.NEXT_PUBLIC_IS_PLATFORM === 'true' ? csp : "frame-ancestors 'none';",
|
|
},
|
|
{
|
|
key: 'Referrer-Policy',
|
|
value: 'strict-origin-when-cross-origin',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
source: '/.well-known/vercel/flags',
|
|
headers: [
|
|
{
|
|
key: 'content-type',
|
|
value: 'application/json',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
source: '/img/:slug*',
|
|
headers: [{ key: 'cache-control', value: 'max-age=2592000' }],
|
|
},
|
|
{
|
|
source: '/fonts/:slug*',
|
|
headers: [{ key: 'cache-control', value: 'max-age=2592000' }],
|
|
},
|
|
]
|
|
},
|
|
images: {
|
|
// to make Vercel avatars work without issue. Vercel uses SVGs for users who don't have set avatars.
|
|
dangerouslyAllowSVG: true,
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'github.com',
|
|
port: '',
|
|
pathname: '**',
|
|
},
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'avatars.githubusercontent.com',
|
|
port: '',
|
|
pathname: '/u/*',
|
|
},
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'api-frameworks.vercel.sh',
|
|
port: '',
|
|
pathname: '**',
|
|
},
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'vercel.com',
|
|
port: '',
|
|
pathname: '**',
|
|
},
|
|
],
|
|
},
|
|
transpilePackages: [
|
|
'ui',
|
|
'ui-patterns',
|
|
'common',
|
|
'shared-data',
|
|
'api-types',
|
|
'icons',
|
|
'libpg-query',
|
|
],
|
|
webpack(config) {
|
|
config.module?.rules
|
|
.find((rule) => rule.oneOf)
|
|
.oneOf.forEach((rule) => {
|
|
if (rule.issuer?.and?.[0]?.toString().includes('_app')) {
|
|
const and = rule.issuer.and
|
|
rule.issuer.or = [/[\\/]node_modules[\\/]monaco-editor[\\/]/, { and }]
|
|
delete rule.issuer.and
|
|
}
|
|
})
|
|
|
|
// .md files to be loaded as raw text
|
|
config.module.rules.push({
|
|
test: /\.md$/,
|
|
type: 'asset/source',
|
|
})
|
|
|
|
return config
|
|
},
|
|
onDemandEntries: {
|
|
maxInactiveAge: 24 * 60 * 60 * 1000,
|
|
pagesBufferLength: 100,
|
|
},
|
|
typescript: {
|
|
// WARNING: production builds can successfully complete even there are type errors
|
|
// Typechecking is checked separately via .github/workflows/typecheck.yml
|
|
ignoreBuildErrors: true,
|
|
},
|
|
eslint: {
|
|
// We are already running linting via GH action, this will skip linting during production build on Vercel
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
}
|
|
|
|
// module.exports = withBundleAnalyzer(nextConfig)
|
|
// Make sure adding Sentry options is the last code to run before exporting, to
|
|
// ensure that your source maps include changes from all other Webpack plugins
|
|
module.exports =
|
|
process.env.NEXT_PUBLIC_IS_PLATFORM === 'true'
|
|
? withSentryConfig(withBundleAnalyzer(nextConfig), {
|
|
silent: true,
|
|
|
|
// For all available options, see:
|
|
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
|
|
|
|
// Upload a larger set of source maps for prettier stack traces (increases build time)
|
|
widenClientFileUpload: true,
|
|
|
|
// Automatically annotate React components to show their full name in breadcrumbs and session replay
|
|
reactComponentAnnotation: {
|
|
enabled: true,
|
|
},
|
|
|
|
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
|
|
// This can increase your server load as well as your hosting bill.
|
|
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
|
|
// side errors will fail.
|
|
tunnelRoute: '/monitoring',
|
|
|
|
// Hides source maps from generated client bundles
|
|
hideSourceMaps: true,
|
|
|
|
// Automatically tree-shake Sentry logger statements to reduce bundle size
|
|
disableLogger: true,
|
|
|
|
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
|
|
// See the following for more information:
|
|
// https://docs.sentry.io/product/crons/
|
|
// https://vercel.com/docs/cron-jobs
|
|
automaticVercelMonitors: true,
|
|
})
|
|
: nextConfig
|