提供基本前后端骨架

This commit is contained in:
hisatri
2026-01-06 23:49:23 +08:00
parent 84d4ccc226
commit 06f8176e23
89 changed files with 19293 additions and 2 deletions

36
frontend/next.config.ts Normal file
View File

@@ -0,0 +1,36 @@
import type { NextConfig } from 'next';
const isProd = process.env.NODE_ENV === 'production';
const nextConfig: NextConfig = {
// 生产环境静态导出,开发环境正常运行
...(isProd ? { output: 'export' } : {}),
// 图片优化(静态导出时禁用)
images: {
unoptimized: true,
},
// 尾随斜杠
trailingSlash: false,
// 开发环境 API 代理
async rewrites() {
if (!isProd) {
return [
{
source: '/api/:path*',
destination: 'http://localhost:8000/api/:path*',
},
{
source: '/health',
destination: 'http://localhost:8000/health',
},
];
}
return [];
},
};
export default nextConfig;