-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
85 lines (82 loc) · 1.88 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/* eslint-disable @typescript-eslint/no-var-requires */
// 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 = {
eslint: {
dirs: ["src"],
},
reactStrictMode: true,
swcMinify: true,
images: {
remotePatterns: [
{
protocol: "https",
hostname: "raw.githubusercontent.com",
port: "",
pathname: "/FortressFinance/assets/master/blockchains/**",
},
],
},
async rewrites() {
return [
{ source: "/api/anvil-mainnet", destination: "http://18.196.63.80:8546" },
{
source: "/api/anvil-arbitrum",
destination: "http://18.196.63.80:8545",
},
]
},
async redirects() {
return [
{
source: "/app",
has: [
{
type: "header",
key: "host",
value: "fortress.finance",
},
],
destination: "https://app.fortress.finance",
permanent: true,
},
{
source: "/app/:slug*",
has: [
{
type: "header",
key: "host",
value: "fortress.finance",
},
],
destination: "https://app.fortress.finance/:slug*",
permanent: true,
},
]
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: [
{
loader: "@svgr/webpack",
options: {
typescript: true,
icon: true,
},
},
],
})
return config
},
}
module.exports = withSentryConfig(
nextConfig,
{ silent: true },
{ hideSourcemaps: true }
)