-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy pathnext.config.js
67 lines (65 loc) · 1.96 KB
/
next.config.js
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
const { withSentryConfig } = require("@sentry/nextjs");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE_BUNDLE === "true",
});
/** @type {import('next').NextConfig} */
const nextConfig = withSentryConfig(
withBundleAnalyzer({
productionBrowserSourceMaps: true,
sentry: {
disableServerWebpackPlugin:
process.env.NEXT_PUBLIC_ENV !== "stag" &&
process.env.NEXT_PUBLIC_ENV !== "prod",
disableClientWebpackPlugin:
process.env.NEXT_PUBLIC_ENV !== "stag" &&
process.env.NEXT_PUBLIC_ENV !== "prod",
},
staticPageGenerationTimeout: 60 * 4,
output: "standalone",
reactStrictMode: true,
swcMinify: true,
images: {
domains: [
"abs.twimg.com",
"assets.coingecko.com",
"coin-images.coingecko.com",
"i.seadn.io",
"lh3.googleusercontent.com",
"openseauserdata.com",
"pbs.twimg.com",
],
},
rewrites: async () => [
{
source: "/api/:path*",
has: [{ type: "host", value: "localhost" }],
destination:
process.env["NEXT_PUBLIC_ENV"] === "stag"
? "https://usm-i7x0.ultrasound.money/api/:path*"
: "https://ultrasound.money/api/:path*",
},
// To test locally with the fam-analysis api running and a local tunnel to receive the oauth2 callback, use the below rewrite.
// {
// source: "/api/auth/:path*",
// has: [
// {
// type: "host",
// value: "oyfy.tunnelto.dev",
// },
// ],
// destination: "http://127.0.0.1:3001/api/auth/:path*",
// },
// {
// source: "/api/fam/queue-for-discord",
// has: [
// {
// type: "host",
// value: "oyfy.tunnelto.dev",
// },
// ],
// destination: "http://127.0.0.1:3001/api/fam/queue-for-discord",
// },
],
}),
);
module.exports = nextConfig;