-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathnext.config.js
96 lines (88 loc) · 1.93 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
const nextTranslate = require('next-translate-plugin')
const MomentLocalesPlugin = require('moment-locales-webpack-plugin')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config, _options) => {
config.resolve.fallback = { fs: false }
config.plugins.push(
new MomentLocalesPlugin({
localesToKeep: [
'be',
'de',
'es',
'fr',
'it',
'nl',
'pt',
'ru'
],
}),
)
return config
},
redirects: async () => ([
{
source: '/maps',
destination: '/m/main',
permanent: true,
},
{
source: '/m',
destination: '/m/main',
permanent: true,
},
{
source: '/t',
destination: '/t/main',
permanent: true,
},
{
source: '/tables',
destination: '/t/main',
permanent: true,
},
{
source: '/tables/:path*',
destination: '/t/:path*',
permanent: true,
},
{
source:'/renn.html/:slug*',
destination: 'https://v0.kartevonmorgen.org/renn.html#/:slug*',
permanent: false
},
{
source:'/businesscard.html/:slug*',
destination: 'https://v0.kartevonmorgen.org/businesscard.html#/:slug*',
permanent: false
},
{
source:'/map.html/:slug*',
destination: 'https://v0.kartevonmorgen.org/map.html#/:slug*',
permanent: false
},
{
source:'/mapAndEntryList.html/:slug*',
destination: 'https://v0.kartevonmorgen.org/mapAndEntryList.html#/:slug*',
permanent: false
}
]),
i18n: {
locales: [
'be',
'de',
'en',
'es',
'fr',
'it',
'nl',
'pt',
'ru'
],
defaultLocale: 'de',
},
}
module.exports = nextTranslate(withBundleAnalyzer(nextConfig))