-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.ts
91 lines (85 loc) · 1.86 KB
/
next.config.ts
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
86
87
88
89
90
91
import { withSentryConfig } from "@sentry/nextjs";
import type { NextConfig } from "next";
import { env } from "./src/env.mjs";
const config: NextConfig = {
experimental: {
reactCompiler: true,
staleTimes: {
dynamic: 60,
},
},
logging: {
fetches: {
fullUrl: process.env.VERCEL_ENV === "development",
},
},
async redirects() {
return [
{
source: "/my",
destination: "/activity",
permanent: true,
},
];
},
async rewrites() {
return [
{
source: "/@:nickname/progress",
destination: "/profile/:nickname/progress",
},
{
source: "/@:nickname/como",
destination: "/profile/:nickname/como",
},
{
source: "/@:nickname/trades",
destination: "/profile/:nickname/trades",
},
{
source: "/@:nickname/list/:list",
destination: "/profile/:nickname/list/:list",
},
{
source: "/@:nickname",
destination: "/profile/:nickname",
},
];
},
images: {
unoptimized: true,
remotePatterns: [
// objekt images
{
protocol: "https",
hostname: "imagedelivery.net",
},
// cosmo images (news, artist etc)
{
protocol: "https",
hostname: "**.cosmo.fans",
},
{
protocol: "https",
hostname: "s3.ap-northeast-2.amazonaws.com",
pathname: "/static.cosmo.fans/**",
},
{
protocol: "https",
hostname: "s3.ap-northeast-2.amazonaws.com",
pathname: "/resources.cosmo.fans/**",
},
],
},
};
export default withSentryConfig(config, {
org: env.SENTRY_ORG,
project: env.SENTRY_PROJECT,
silent: !process.env.CI,
widenClientFileUpload: true,
reactComponentAnnotation: {
enabled: true,
},
hideSourceMaps: true,
disableLogger: true,
});