| 1 | import path from "node:path"; |
| 2 | |
| 3 | import type { NextConfig |
| 4 | |
| 5 | const nextConfig: NextConfig |
| 6 | /* config options here */ |
| 7 | reactCompiler: true, |
| 8 | // Emits `.next/standalone` with only the server and its used dependencies. |
| 9 | output: "standalone", |
| 10 | // The app lives in a workspace, so tracing has to start at the repo root. |
| 11 | outputFileTracingRoot: path.join |
| 12 | // A pull request lives at `pull/<n>`, as on GitHub; links from before the move used `pulls/<n>`. |
| 13 | async redirects() { |
| 14 | return [ |
| 15 | { |
| 16 | source: "/:username/:repo/pulls/:number(\\d+)/:rest*", |
| 17 | destination: "/:username/:repo/pull/:number/:rest*", |
| 18 | permanent: true, |
| 19 | }, |
| 20 | ]; |
| 21 | }, |
| 22 | }; |
| 23 | |
| 24 | export default nextConfig; |