生产管理系统 nextjs标准化改造

This commit is contained in:
2025-11-11 19:50:37 +08:00
parent 260917dfb4
commit 9778a0f26a
42 changed files with 13892 additions and 17578 deletions

36
crop-x-new/next.config.ts Normal file
View File

@@ -0,0 +1,36 @@
// next.config.ts
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
// 构建时报 TS 校验(可按需开启/关闭)
typescript: {
ignoreBuildErrors: false,
},
// 将 ESM 包转译(如有 Tree-shaking/TS 产物需要)
transpilePackages: ['lucide-react'],
// 便于部署到容器/Serverless
output: 'standalone',
// 若有其它实验性开关可放这里(保持空对象即可)
experimental: {
// 例如typedRoutes: true
},
// 解决工作区根目录问题(通常保持默认即可;你这里明确指定也可)
outputFileTracingRoot: process.cwd(),
// 反向代理(避免本地 CORS
async rewrites() {
return [
{
source: '/api/:path*',
destination:
'https://gitea-admin-hm-smart-agri-app.dev.maimaiag.com/api/:path*',
},
];
},
};
export default nextConfig;