import type { NextConfig } from "next"; const nextConfig: NextConfig = { // 关闭左下角的开发指示器(dev overlay 角标) devIndicators: false, // 容器化部署:产出精简的 standalone 包(node server.js 启动) output: "standalone", // next/image 配置 // - unoptimized: 关闭服务端 image 优化代理。资源已在 TOS 桶里是 WebP + 适配尺寸, // 走 CDN,无需 Next.js 再编码一次。还能绕过 dev 时 fake-IP 代理(Clash/V2Ray TUN // 返回 198.18.x.x)被 Next 16 拒绝 fetch 的问题。 // - remotePatterns: 即便不优化,Next 16 仍会校验远程域名白名单,保留 TOS + CDN 域名。 images: { unoptimized: true, remotePatterns: [ { protocol: "https", hostname: "*.tos-cn-shanghai.volces.com" }, { protocol: "https", hostname: "*.tos-cn-beijing.volces.com" }, { protocol: "https", hostname: "*.volccdn.com" }, ], }, }; export default nextConfig;