更新配置文件

This commit is contained in:
张元坤 2025-07-10 13:23:08 +08:00
parent 0bc2511b63
commit 136f88b4c7

View File

@ -1,34 +1,32 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
devIndicators: false, // show dev tools
productionBrowserSourceMaps: false, // enable browser source map generation during the production build
// Configure pageExtensions to include md and mdx
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
experimental: {
// appDir: true,
reactStrictMode: true,
// 压缩优化Next.js 13+默认启用SWC无需手动配置
compress: true,
// 图片优化
images: {
formats: ["image/avif", "image/webp"],
domains: ["cdn.yourdomain.com"],
},
// fix all before production. Now it slow the develop speed.
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
typescript: {
// https://nextjs.org/docs/api-reference/next.config.js/ignoring-typescript-errors
ignoreBuildErrors: true,
// 修正后的开发指示器配置
devIndicators: {
position: "bottom-right", // 新版统一用position
},
// 页面扩展名
pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"],
// 路由重写
async rewrites() {
return [
{
source: '/files/:path*',
destination: `${process.env.NEXT_PUBLIC_FILES_URL}/:path*`,
source: "/dev-api/:path*",
destination: "http://192.168.6.9:8085/:path*",
},
{
source: '/dev-api/:path*',
destination: 'http://192.168.6.9:8085/:path*',
},
]
];
},
}
};
module.exports = nextConfig
module.exports = nextConfig;