-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
49 lines (46 loc) · 983 Bytes
/
next.config.mjs
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
import remarkGfm from 'remark-gfm'
import createMDX from '@next/mdx'
import NextBundleAnalyzer from '@next/bundle-analyzer'
import nextTranslate from 'next-translate-plugin'
const withMDX = createMDX({
extension: /\.mdx?$/,
options: {
remarkPlugins: [remarkGfm],
rehypePlugins: [],
},
})
const withBundleAnalyzer = NextBundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
})
export default nextTranslate(withBundleAnalyzer(
withMDX({
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
reactStrictMode: true,
output: 'standalone',
webpack: (config) => {
config.resolve.fallback = { fs: false }
return config
},
i18n: {
defaultLocale: 'zh',
locales: ['zh', 'en']
},
async rewrites() {
return [
{
source: '/:locale/index.xml',
destination: '/index.xml',
locale: false,
},
]
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'image.gujiakai.top'
},
],
}
})
))