mirror of
https://github.com/woodchen-ink/proxy-go.git
synced 2025-07-19 00:41:55 +08:00
- 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
23 lines
568 B
JavaScript
23 lines
568 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: '/admin/api/:path*',
|
|
destination: 'http://127.0.0.1:3336/admin/api/:path*',
|
|
},
|
|
]
|
|
},
|
|
}
|
|
|
|
module.exports = nextConfig
|