Roo-Code/apps/web-roo-code/next.config.ts
2025-06-03 14:03:19 -07:00

28 lines
652 B
TypeScript

import type { NextConfig } from "next"
const nextConfig: NextConfig = {
webpack: (config) => {
config.resolve.extensionAlias = { ".js": [".ts", ".tsx", ".js", ".jsx"] }
return config
},
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,
},
]
},
}
export default nextConfig