flnxi-Wu/next.config.js
WuYongJie 63ec6b7dfb fix: 修复排行榜按钮消失、tag排序和输入框浅色模式问题
1. 排行榜悬浮窗关闭后小按钮消失问题
   - 修复面板居中模式关闭时按钮位置错误
   - 保存并恢复按钮的居中状态

2. 首页tag按钮按素材数量排序
   - 添加按素材数量降序排序逻辑

3. 上传弹窗输入框浅色模式文字不可见
   - 添加 text-slate-900 确保浅色模式下文字可见
   - 添加 placeholder 样式确保占位符正确显示
2025-12-14 21:41:29 +08:00

44 lines
1.3 KiB
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 = {
output: 'standalone',
productionBrowserSourceMaps: false,
compress: true,
swcMinify: true,
eslint: {
// 在生产构建时忽略ESLint错误
ignoreDuringBuilds: true,
},
typescript: {
// 在生产构建时忽略TypeScript错误(如果需要)
// ignoreBuildErrors: true,
},
images: {
remotePatterns: (() => {
const hosts = (process.env.IMAGE_REMOTE_HOSTS || '').split(',').map(s => s.trim()).filter(Boolean)
const defaults = ['s3.1080p.hk', '45.249.208.118', 'localhost'] // 添加服务器IP和localhost支持
const all = Array.from(new Set([...defaults, ...hosts]))
const patterns = []
for (const h of all) {
patterns.push({ protocol: 'https', hostname: h })
patterns.push({ protocol: 'http', hostname: h })
}
return patterns
})(),
},
experimental: {
serverActions: {
bodySizeLimit: '10gb', // Server Actions 的限制 (10GB)
},
},
// 允许构建时出现预渲染错误(这些页面会在运行时动态渲染)
onDemandEntries: {
maxInactiveAge: 25 * 1000,
pagesBufferLength: 2,
},
// 注意:CORS配置移到middleware.ts中处理,因为需要动态设置origin
// 当使用credentials时,不能使用通配符*
}
module.exports = nextConfig