dify-conversation/next.config.js
wenyongda d2d96ab315 Dockerfile打包使用pnpm
next.js打包忽略eslint和typescript报错导致打包失败的问题
ant-design引入兼容包,以兼容React19
eslint配置文件由json更换成js
反馈内容由写死的改为获取当前的conversationid会话ID,反馈的用户名称username从cookie里获取
反馈弹窗弹出时使用Promise异步等待如果没有点击确定,则不传递给dify已反馈成功请求
2025-07-14 16:26:45 +08:00

45 lines
1.1 KiB
JavaScript
Raw Permalink 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 = {
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