-
Notifications
You must be signed in to change notification settings - Fork 4
/
next.config.js
123 lines (120 loc) · 2.72 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
const withImages = require("next-images");
module.exports = {
...withImages(),
future: {
webpack5: true,
},
webpack: (config, { dev, isServer }) => {
if (!dev && !isServer) {
Object.assign(config.resolve.alias, {
react: "preact/compat",
"react-dom": "preact/compat",
});
}
Object.assign(config.externals, {
fs: "fs",
});
Object.assign(config.module, {
rules: config.module.rules.concat([
{
test: /\.md$/,
loader: "emit-file-loader",
options: {
name: "dist/[path][name].[ext]",
},
},
{
test: /\.md$/,
loader: "raw-loader",
},
]),
});
return config;
},
async headers() {
return [
{
source: "/(.*)",
headers: [
{
key: "X-Community-Contract",
value: "usjm4PCxUd5mtaon7zc97-dt-3qf67yPyqgzLnLqk5A",
},
],
},
];
},
async redirects() {
return [
{
source: "/u/:user",
destination: "/@:user",
permanent: true,
},
{
source: "/user/:user",
destination: "/@:user",
permanent: true,
},
{
source: "/roadmap",
destination:
"https://www.notion.so/verto/48f99dfb0ba744f5b5257185f53ad7c4",
permanent: true,
},
{
source: "/feedback",
destination: "https://forms.gle/m3TJDfg1HRpV994Y8",
permanent: true,
},
];
},
async rewrites() {
return [
{
source: "/(@):user",
destination: "/user/:user",
},
{
source: "/(@):user/trades",
destination: "/user/:user/trades",
},
{
source: "/(@):user/transactions",
destination: "/user/:user/transactions",
},
{
source: "/(@):user/creations",
destination: "/user/:user/creations",
},
{
source: "/(@):user/owns",
destination: "/user/:user/owns",
},
{
source: "/i/win",
destination:
"https://raw.githubusercontent.com/useverto/trading-post/master/install/windows.ps1",
},
{
source: "/i/mac",
destination:
"https://raw.githubusercontent.com/useverto/trading-post/master/install/mac.sh",
},
{
source: "/i/linux",
destination:
"https://raw.githubusercontent.com/useverto/trading-post/master/install/linux.sh",
},
{
source: "/chat",
destination: "https://discord.gg/sNgJkMg",
},
{
source: "/link",
destination:
"https://arweave.net/CodqSDWXY5CALyMf9oFLCtTDRYdW4lV9X9O7j-73g1U",
},
];
},
};