visual-novel-web/next.config.ts

23 lines
677 B
TypeScript
Raw Permalink Normal View History

2025-10-28 07:59:26 +00:00
import type { NextConfig } from 'next';
2025-11-05 11:32:23 +00:00
import createNextIntlPlugin from 'next-intl/plugin';
// 指定 i18n 配置文件路径,让 next-intl 知道支持的语言
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts');
2025-10-28 07:59:26 +00:00
const nextConfig: NextConfig = {
reactStrictMode: false,
2025-11-05 11:32:23 +00:00
images: {
// 这些域不走next的image代理
2025-11-06 09:47:54 +00:00
remotePatterns: [{ hostname: 'example.com', protocol: 'https' }],
2025-11-05 11:32:23 +00:00
},
2025-10-31 02:59:49 +00:00
async rewrites() {
return [
{
source: '/api/:path*', // 前端请求 /api/xxx
destination: 'http://54.223.196.180:8091/:path*', // 实际请求到后端服务器
},
];
},
2025-10-28 07:59:26 +00:00
};
2025-11-05 11:32:23 +00:00
export default withNextIntl(nextConfig);