-
Notifications
You must be signed in to change notification settings - Fork 730
Expand file tree
/
Copy pathnext.config.ts
More file actions
53 lines (48 loc) · 975 Bytes
/
next.config.ts
File metadata and controls
53 lines (48 loc) · 975 Bytes
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
import { NextConfig } from 'next'
import { codeInspectorPlugin } from 'code-inspector-plugin'
const nextConfig: NextConfig = {
devIndicators: false,
reactStrictMode: false,
reactCompiler: true,
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
typescript: {
ignoreBuildErrors: true
},
experimental: {
scrollRestoration: false
},
turbopack: {
rules: {
'*.svg': {
loaders: ['@svgr/webpack'],
as: '*.js'
}
// ...codeInspectorPlugin({
// bundler: 'turbopack'
// })
},
resolveExtensions: ['.mdx', '.tsx', '.ts', '.jsx', '.js', '.mjs', '.json', 'css']
},
webpack: config => {
config.module.rules.push({
test: /\.svg$/i,
use: [{ loader: '@svgr/webpack', options: { svgo: false } }]
})
return config
},
async redirects() {
return [
{
source: '/zh',
destination: '/',
permanent: true
},
{
source: '/en',
destination: '/',
permanent: true
}
]
}
}
export default nextConfig