26 lines
684 B
TypeScript
26 lines
684 B
TypeScript
import type { NextConfig } from 'next';
|
|
import createNextIntlPlugin from 'next-intl/plugin';
|
|
// 指定 i18n 配置文件路径,让 next-intl 知道支持的语言
|
|
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts');
|
|
|
|
const nextConfig: NextConfig = {
|
|
reactStrictMode: false,
|
|
eslint: {
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
images: {
|
|
// 这些域不走next的image代理
|
|
domains: ['example.com'],
|
|
},
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: '/api/:path*', // 前端请求 /api/xxx
|
|
destination: 'http://54.223.196.180:8091/:path*', // 实际请求到后端服务器
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default withNextIntl(nextConfig);
|