Files
smart-crop-ui/crop-x-new/next.config.ts

37 lines
900 B
TypeScript
Raw Permalink 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.

// 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;