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
This commit is contained in:
wood chen 2025-02-17 06:44:53 +08:00
parent bee914fc61
commit dd57ec2bd5

View File

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