dify-conversation/next.config.js

33 lines
714 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/** @type {import('next').NextConfig} */
const nextConfig = {
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;