Files
9router/next.config.mjs
2026-01-05 09:58:59 +07:00

45 lines
891 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
env: {
NEXT_PUBLIC_CLOUD_URL: "https://9router.com",
},
webpack: (config, { isServer }) => {
// Ignore fs/path modules in browser bundle
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
path: false,
};
}
return config;
},
async rewrites() {
return [
{
source: "/v1/v1/:path*",
destination: "/api/v1/:path*"
},
{
source: "/v1/v1",
destination: "/api/v1"
},
{
source: "/codex/:path*",
destination: "/api/v1/responses"
},
{
source: "/v1/:path*",
destination: "/api/v1/:path*"
},
{
source: "/v1",
destination: "/api/v1"
}
];
}
};
export default nextConfig;