mirror of
https://github.com/woodchen-ink/proxy-go.git
synced 2025-07-18 00:21:56 +08:00
- 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
23 lines
562 B
JavaScript
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
|