forked from casperiv0/ghostybot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
55 lines (52 loc) · 1.28 KB
/
next.config.js
File metadata and controls
55 lines (52 loc) · 1.28 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
49
50
51
52
53
54
55
/* eslint-disable */
const withPWA = require("next-pwa");
module.exports = withPWA({
images: {
domains: ["cdn.discordapp.com"] /* KEEP THIS OTHERWISE IMAGES WILL NOT LOAD */,
},
async redirects() {
return [
{
source: "/add",
destination:
"https://discord.com/oauth2/authorize?client_id=632843197600759809&scope=bot applications.commands&permissions=8",
permanent: true,
},
{
source: "/support",
destination: "https://discord.gg/XxHrtkA",
permanent: true,
},
{
source: "/logout",
destination: "/api/auth/logout",
permanent: true,
},
{
source: "/login",
destination: "/api/auth/login",
permanent: true,
},
];
},
future: {
webpack5: true,
},
webpack: (config, { dev, isServer }) => {
// fixes 'cannot resolve 'erlpack' in discord.js/src'
config.externals.push("erlpack");
if (!dev && !isServer) {
config.resolve.alias = {
...config.resolve.alias,
react: "preact/compat",
"react-dom/test-utils": "preact/test-utils",
"react-dom": "preact/compat",
};
}
return config;
},
pwa: {
disable: process.env.NODE_ENV !== "production",
dest: "public",
},
});