/** @type {import('next').NextConfig} */ const nextConfig = { output: 'export', // 其他 Next.js 配置... // 添加 rewrites 配置用于开发环境代理 async rewrites() { return [ { source: '/api/:path*', // 匹配所有以 /api 开头的路径 destination: 'http://localhost:7529/api/:path*', // 代理到后端服务地址 }, ]; }, }; export default nextConfig;