/** @type {import('next').NextConfig} */ const nextConfig = { eslint: { // Warning: This allows production builds to successfully complete even if // your project has ESLint errors. ignoreDuringBuilds: true, }, typescript: { // !! WARN !! // Dangerously allow production builds to successfully complete even if // your project has type errors. // !! WARN !! ignoreBuildErrors: true, }, reactStrictMode: true, // 压缩优化(Next.js 13+默认启用SWC,无需手动配置) compress: true, // 图片优化 images: { formats: ['image/avif', 'image/webp'], domains: ['cdn.yourdomain.com'], }, // 修正后的开发指示器配置 devIndicators: { position: 'bottom-right', // 新版统一用position }, // 页面扩展名 pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'], // 路由重写 async rewrites() { return [ { source: '/dev-api/:path*', destination: `${process.env.NEXT_PUBLIC_BASE_API_URL}/:path*`, }, ] }, } module.exports = nextConfig