-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.mjs
More file actions
42 lines (38 loc) · 1010 Bytes
/
next.config.mjs
File metadata and controls
42 lines (38 loc) · 1010 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
import nextMDX from '@next/mdx'
import { recmaPlugins } from './src/mdx/recma.mjs'
import { rehypePlugins } from './src/mdx/rehype.mjs'
import { remarkPlugins } from './src/mdx/remark.mjs'
import withSearch from './src/mdx/search.mjs'
const withMDX = nextMDX({
options: {
remarkPlugins,
rehypePlugins,
recmaPlugins,
},
})
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
allowedDevOrigins: ['127.0.0.1'],
// 确保 standalone 模式下包含所有 MDX 文件
outputFileTracingIncludes: {
'**/*': ['./src/app/**/*.mdx'],
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'storage.sciol.ac.cn',
pathname: '/library/docs/**',
},
],
},
turbopack: {
resolveExtensions: ['.mdx', '.tsx', '.ts', '.jsx', '.js', '.json'],
resolveAlias: {
underscore: 'lodash',
},
},
}
export default withSearch(withMDX(nextConfig))