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*',