proxy-go/web/next.config.js
wood chen 33d6a51416 refactor(web): Migrate to modern web frontend and simplify admin routes
- Remove legacy static files, templates, and JavaScript
- Update main.go to serve SPA-style web application
- Modify admin route handling to support client-side routing
- Simplify configuration and metrics API endpoints
- Remove server-side template rendering in favor of static file serving
- Update Dockerfile and GitHub Actions to build web frontend
2025-02-15 11:44:09 +08:00

23 lines
562 B
JavaScript

/** @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: '/api/:path*',
destination: 'http://localhost:3336/admin/api/:path*',
},
]
},
}
module.exports = nextConfig