next.config.ts 981 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import type { NextConfig } from "next"
  2. const nextConfig: NextConfig = {
  3. webpack: (config) => {
  4. config.resolve.extensionAlias = { ".js": [".ts", ".tsx", ".js", ".jsx"] }
  5. return config
  6. },
  7. async redirects() {
  8. return [
  9. // Redirect www to non-www
  10. {
  11. source: "/:path*",
  12. has: [{ type: "host", value: "www.roocode.com" }],
  13. destination: "https://roocode.com/:path*",
  14. permanent: true,
  15. },
  16. // Redirect HTTP to HTTPS
  17. {
  18. source: "/:path*",
  19. has: [{ type: "header", key: "x-forwarded-proto", value: "http" }],
  20. destination: "https://roocode.com/:path*",
  21. permanent: true,
  22. },
  23. // Redirect cloud waitlist to Notion page (kept for extension compatibility)
  24. {
  25. source: "/cloud-waitlist",
  26. destination: "https://roo-code.notion.site/238fd1401b0a8087b858e1ad431507cf?pvs=105",
  27. permanent: false,
  28. },
  29. {
  30. source: "/provider/pricing",
  31. destination: "/provider",
  32. permanent: true,
  33. },
  34. ]
  35. },
  36. }
  37. export default nextConfig