-
Notifications
You must be signed in to change notification settings - Fork 816
Expand file tree
/
Copy pathnext.config.js
More file actions
48 lines (45 loc) · 1.22 KB
/
Copy pathnext.config.js
File metadata and controls
48 lines (45 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// This file sets a custom webpack configuration to use your Next.js app
// with Sentry.
// https://nextjs.org/docs/api-reference/next.config.js/introduction
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
const { withSentryConfig } = require('@sentry/nextjs')
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: process.env.SUPABASE_HOSTNAME || 'xxxx.supabase.co', // to prevent vercel failed
},
{
protocol: 'https',
hostname: 'b.jimmylv.cn',
},
{
protocol: 'https',
hostname: 'bibigpt.co',
},
{
protocol: 'https',
hostname: 'avatars.dicebear.com',
},
],
},
async rewrites() {
return [
{
source: '/api/:path*',
destination: `${process.env.INTERNAL_API_HOSTNAME || ''}/api/:path*`,
},
{
source: '/blocked',
destination: '/shop',
},
]
},
}
const shouldEnableSentry = Boolean(process.env.SENTRY_AUTH_TOKEN)
module.exports = shouldEnableSentry
? withSentryConfig(nextConfig, { silent: true }, { hideSourceMaps: true })
: nextConfig