-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext.config.ts
More file actions
69 lines (61 loc) · 1.61 KB
/
Copy pathnext.config.ts
File metadata and controls
69 lines (61 loc) · 1.61 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
66
67
68
69
import { withContentCollections } from "@content-collections/next";
import type { NextConfig } from "next";
import createNextIntlPlugin from "next-intl/plugin";
const nextConfig: NextConfig = {
// 严格模式
// React strict mode
reactStrictMode: true,
// 自动优化组件渲染
// React compiler
reactCompiler: true,
// 缓存组件
// Cache components
cacheComponents: true,
// 输出模式
// Output mode
output: "standalone",
// 允许从这些远程域加载图片
// Allow loading images from these remote domains
images: {
remotePatterns: [
{
protocol: "https",
hostname: "replicate.com",
},
{
protocol: "https",
hostname: "replicate.delivery",
},
{
protocol: "https",
hostname: "*.replicate.delivery",
},
{
protocol: "https",
hostname: "avatar.vercel.sh",
pathname: "/**",
},
{
protocol: "https",
hostname: "github.com",
},
],
},
// 实验特性配置
// Experimental feature configuration
experimental: {
// 在终端中显示浏览器调试信息
// Display browser debugging information in the terminal
browserDebugInfoInTerminal: true,
// 文件系统缓存
// file system cache
turbopackFileSystemCacheForDev: true,
},
};
// 插件配置
// Plugin configuration
const withNextIntl = createNextIntlPlugin();
// 链式调用方式组合多个插件
// Chained approach for multiple plugins
// withContentCollections must be the outermost wrapper
export default withContentCollections(withNextIntl(nextConfig));