-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext.config.mjs
More file actions
65 lines (60 loc) · 1.79 KB
/
next.config.mjs
File metadata and controls
65 lines (60 loc) · 1.79 KB
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
// Legacy Nextra docs-theme config (kept for reference during migration):
// import nextra from 'nextra'
//
// const withNextra = nextra({
// theme: 'nextra-theme-docs',
// themeConfig: './theme.config.tsx',
// })
//
// export default withNextra({ ... })
import { withMarkdownWebBook } from '@document-writing-tools/kernux-theme/withMarkdownWebBook'
import path from 'path'
import { fileURLToPath } from 'url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const config = withMarkdownWebBook({
env: {
DWT_DEFAULT_LOCALE: 'en',
},
trailingSlash: true,
compiler: {
removeConsole: false,
},
webpack: (config) => {
config.resolve.fallback = { fs: false }
config.resolve.alias['react'] = path.resolve(
__dirname,
'node_modules/react',
)
config.resolve.alias['react-dom'] = path.resolve(
__dirname,
'node_modules/react-dom',
)
return config
},
basePath: process.env.BASE_PATH,
async redirects() {
return [
{
source: '/introduction',
destination: '/',
permanent: true,
},
{
source: '/concept-guides/container-hardening/process',
destination: '/tutorials/container-hardening/process',
permanent: true,
},
{
source: '/concept-guides/container-hardening/cve-decision',
destination: '/tutorials/container-hardening/cve-decision',
permanent: true,
},
{
source: '/imprint',
destination: 'https://l3montree.com/impressum',
permanent: false,
},
]
},
})
export default config