-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathnext.config.js
executable file
·72 lines (70 loc) · 1.63 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
/**
* @type {import("next").NextConfig}
* */
const nextConfig = {
eslint: {
// Warning: Only enable this if you do linting through CI before pushing to production!
ignoreDuringBuilds: true,
},
async redirects() {
return [
{
source: '/:id(\\d{1,})',
destination: '/user/:id',
permanent: true,
},
{
source: '/:id(\\d{1,})/json',
destination: '/api/user/:id',
permanent: true,
},
{
source: '/user/:id(\\d{1,})/json',
destination: '/api/user/:id',
permanent: true,
},
];
},
async rewrites() {
return [
{
source: '/:id/tag.png',
destination: '/api/riitag/:id*',
},
{
source: '/:id/riitag.wad',
destination: '/api/user/:id*/riitag.wad',
},
{
source: '/:id/tag.max.png',
destination: '/api/riitag/:id*?max=true',
},
{
source: '/3ds',
destination: '/api/update-tag/3ds',
},
{
source: '/switch',
destination: '/api/update-tag/switch',
},
{
source: '/wii',
destination: '/api/update-tag/wii',
},
{
source: '/wiiu',
destination: '/api/update-tag/wiiu',
},
{
source: '/Wiinnertag.xml',
destination: '/api/account/wiinnertag',
},
];
},
};
// eslint-disable-next-line unicorn/prefer-module
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.WEBPACK_ANALYZE === 'true',
});
// eslint-disable-next-line unicorn/prefer-module
module.exports = withBundleAnalyzer(nextConfig);