generated from ChrisCrossCrash/next-js-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
54 lines (50 loc) · 1.41 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
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
i18n: {
locales: ['en'],
defaultLocale: 'en',
},
// Normally I wouldn't want to build the source maps for production,
// but the point of this site is to showcase my code.
productionBrowserSourceMaps: true,
typescript: {
// The build process has its own tsconfig.json, which ignores the cypress directory.
tsconfigPath: './tsconfig.build.json',
},
webpack(config) {
// Prevent the error: `Module not found: Can't resolve 'fs'`
// For some reason this happens when importing `depth-section`
// https://stackoverflow.com/a/67478653/8886761
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
}
return config
},
// https://nextjs.org/docs/api-reference/next.config.js/redirects
async redirects() {
return [
{
source: '/art',
destination: 'https://insta-art-frontend.vercel.app/',
permanent: false,
},
{
source: '/shopping',
destination: 'https://ck-shopping.vercel.app/',
permanent: false,
},
{
source: '/github',
destination: 'https://github.com/ChrisCrossCrash',
permanent: false,
},
{
source: '/chatgpt-prompt-divider',
destination: 'https://chatgpt-prompt-divider.vercel.app/',
permanent: false,
},
]
},
}