mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import type { NextConfig } from "next"
|
|
|
|
// Get the docs URL from environment variable, with a fallback for local development
|
|
const DOCS_URL = process.env.DOCS_URL || "https://roo-docs.vercel.app"
|
|
|
|
const nextConfig: NextConfig = {
|
|
webpack: (config) => {
|
|
config.resolve.extensionAlias = { ".js": [".ts", ".tsx", ".js", ".jsx"] }
|
|
return config
|
|
},
|
|
async rewrites() {
|
|
return [
|
|
// Proxy /docs to the separate docs deployment
|
|
{
|
|
source: "/docs",
|
|
destination: `${DOCS_URL}/docs`,
|
|
},
|
|
{
|
|
source: "/docs/:path*",
|
|
destination: `${DOCS_URL}/docs/:path*`,
|
|
},
|
|
]
|
|
},
|
|
async redirects() {
|
|
return [
|
|
// Redirect www to non-www
|
|
{
|
|
source: "/:path*",
|
|
has: [{ type: "host", value: "www.roocode.com" }],
|
|
destination: "https://roocode.com/:path*",
|
|
permanent: true,
|
|
},
|
|
// Redirect HTTP to HTTPS
|
|
{
|
|
source: "/:path*",
|
|
has: [{ type: "header", key: "x-forwarded-proto", value: "http" }],
|
|
destination: "https://roocode.com/:path*",
|
|
permanent: true,
|
|
},
|
|
// Redirect cloud waitlist to Notion page (kept for extension compatibility)
|
|
{
|
|
source: "/cloud-waitlist",
|
|
destination: "https://roo-code.notion.site/238fd1401b0a8087b858e1ad431507cf?pvs=105",
|
|
permanent: false,
|
|
},
|
|
]
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|