-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnext.config.js
60 lines (58 loc) · 1.52 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
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
const i18nConfig = require('./next-i18next.config')
module.exports = withBundleAnalyzer({
assetPrefix: process.env.BUILD_ASSET_PREFIX || '',
swcMinify: true,
productionBrowserSourceMaps: true,
images: {
domains: [
'i.imgur.com',
'api.producthunt.com',
'github.com',
'cdn.kubesail.com',
'artifacthub.io',
'img.shields.io',
'avatars.githubusercontent.com',
'static.kubesail.com',
'api.kubesail.com',
'cdn.kubesail.com',
].filter(Boolean),
},
async redirects() {
return [
{
source: '/rpiboot',
destination: 'https://docs.kubesail.com/guides/pibox/rpiboot',
permanent: false,
},
{
source: '/case',
destination: 'https://docs.kubesail.com/guides/pibox/hardware',
permanent: false,
},
{
source: '/hackersetup',
destination: 'https://docs.kubesail.com/guides/pibox/hardware',
permanent: false,
},
{
source: '/setup',
destination: 'https://docs.kubesail.com/getting-started/',
permanent: false,
},
]
},
...i18nConfig,
// webpack: config => {
// config.module.rules.push({
// test: /\.(eot|ttf|woff|woff2|mp4|pdf|webm|txt|json|obj|mtl)$/,
// type: 'asset/resource',
// generator: {
// filename: 'static/chunks/[path][name].[hash][ext]',
// },
// })
// return config
// },
})