forked from Tricked-dev/tricked-dev.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
64 lines (63 loc) · 1.75 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
/* eslint-disable react-hooks/rules-of-hooks */
const withMDX = require("@next/mdx")({
extension: /\.mdx$/,
});
const withPWA = require("next-pwa");
const plugins = require("next-compose-plugins");
const config = {
dest: "public",
webpack5: true,
pwa: {
dest: "public",
},
reactStrictMode: true,
compress: true,
purge: ["./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"],
typescript: {
ignoreBuildErrors: true,
},
productionBrowserSourceMaps: true,
// i18n: {
// // These are all the locales you want to support in
// // your application
// locales: ["en", "nl"],
// // This is the default locale you want to be used when visiting
// // a non-locale prefixed path e.g. `/hello`
// defaultLocale: "en",
// },
async redirects() {
return [
{
source: "/matrix",
destination: "https://matrix.to/#/#tricked-hangout:matrix.org",
permanent: true,
},
{
source: "/discord",
destination: "https://discord.gg/mY8zTARu4g",
permanent: true,
},
{
source: "/github",
destination: "https://github.com/Tricked-dev/Tricked-dev.github.io",
permanent: true,
},
{
source: "/aethor/invite",
destination: "https://discord.com/oauth2/authorize?client_id=870383692403593226&permissions=117824&scope=bot%20applications.commands",
permanent: true,
},
{
source: "/aethor/support",
destination: "https://discord.gg/zwUQGAG4cP",
permanent: true,
},
{
source: "/service-worker.js",
destination: "/_next/static/service-worker.js",
permanent: true,
},
];
},
};
module.exports = plugins([[withPWA], [withMDX]], config);