-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
26 lines (25 loc) · 947 Bytes
/
Copy pathnext.config.mjs
File metadata and controls
26 lines (25 loc) · 947 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
/** @type {import('next').NextConfig} */
const nextConfig = {
// Docker 部署用 standalone 产物(node server.js 单进程,含后台刷新循环)
output: "standalone",
// 原生/CJS 服务端依赖不打包进 serverless bundle;Cap 的 WASM 文件需保留原始目录结构
serverExternalPackages: ["mysql2", "@cap.js/wasm"],
// 运行时数据(站点凭证/会话密钥)绝不进构建产物:
// 文件追踪会因代码引用 ./data 路径把整个目录拷进 standalone,必须显式排除
outputFileTracingExcludes: { "*": ["./data/**", "data/**"] },
// antd/pro-components ESM 转译
transpilePackages: [
"antd",
"@ant-design/pro-components",
"@ant-design/pro-layout",
"@ant-design/pro-table",
"@ant-design/pro-form",
"@ant-design/pro-card",
"@ant-design/icons",
"@ant-design/plots",
"rc-util",
"rc-pagination",
"rc-picker",
],
};
export default nextConfig;