From dd57ec2bd5900749c562313ff8d47ec1646c38c3 Mon Sep 17 00:00:00 2001 From: wood chen Date: Mon, 17 Feb 2025 06:44:53 +0800 Subject: [PATCH] chore(build): Configure Next.js export and deployment settings - Add export configuration for production builds - Set base path for admin deployment - Enable trailing slash for consistent routing - Ignore ESLint during builds - Configure development proxy rewrites --- web/next.config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/next.config.js b/web/next.config.js index bff6fb4..68c8594 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -1,6 +1,16 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + output: process.env.NODE_ENV === 'development' ? undefined : 'export', + basePath: process.env.NODE_ENV === 'development' ? '' : '/admin', + trailingSlash: true, + eslint: { + ignoreDuringBuilds: true, + }, + // 开发环境配置代理 async rewrites() { + if (process.env.NODE_ENV !== 'development') { + return [] + } return [ { source: '/admin/api/:path*',