forked from civitai/civitai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
105 lines (103 loc) · 2.7 KB
/
next.config.mjs
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
// @ts-check
import { withPlausibleProxy } from 'next-plausible';
/**
* Don't be scared of the generics here.
* All they do is to give us autocompletion when using this.
*
* @template {import('next').NextConfig} T
* @param {T} config - A generic parameter that flows through to the return type
* @constraint {{import('next').NextConfig}}
*/
function defineNextConfig(config) {
return withPlausibleProxy({
scriptName: 'civit-eye',
customDomain: 'https://analytics.civitai.com',
})(config);
}
export default defineNextConfig({
reactStrictMode: true,
// Next.js i18n docs: https://nextjs.org/docs/advanced-features/i18n-routing
i18n: {
locales: ['en'],
defaultLocale: 'en',
},
eslint: {
ignoreDuringBuilds: true,
},
generateEtags: false,
compress: false,
images: {
domains: [
's3.us-west-1.wasabisys.com',
'model-share.s3.us-west-1.wasabisys.com',
'civitai-prod.s3.us-west-1.wasabisys.com',
'civitai-dev.s3.us-west-1.wasabisys.com',
],
},
experimental: {
// scrollRestoration: true,
largePageDataBytes: 512 * 100000,
modularizeImports: {
'lodash': {
transform: 'lodash/{{member}}',
preventFullImport: true
}
}
},
poweredByHeader: false,
redirects: async () => {
return [
{
source: '/api/download/training-data/:modelVersionId',
destination: '/api/download/models/:modelVersionId?type=Training%20Data',
permanent: true,
},
{
source: '/github/:path*',
destination: 'https://github.com/civitai/civitai/:path*',
permanent: true,
},
{
source: '/discord',
destination: 'https://discord.gg/UwX5wKwm6c',
permanent: true,
},
{
source: '/twitter',
destination: 'https://twitter.com/HelloCivitai',
permanent: true,
},
{
source: '/reddit',
destination: 'https://reddit.com/r/civitai',
permanent: true,
},
{
source: '/ideas',
destination: 'https://github.com/civitai/civitai/discussions/categories/ideas',
permanent: true,
},
{
source: '/v/civitai-link-intro',
destination: 'https://youtu.be/MaSRXvM05x4',
permanent: false,
},
{
source: '/v/civitai-link-installation',
destination: 'https://youtu.be/fs-Zs-fvxb0',
permanent: false,
},
{
source: '/gallery/:path*',
destination: '/images/:path*',
permanent: true,
},
{
source: '/appeal',
destination: 'https://forms.clickup.com/8459928/f/825mr-5844/5NXSA2EIT3YOS2JSF7',
permanent: true,
},
];
},
output: 'standalone',
});