From f0e34caa258989d6722ec5573da2926361f3d3d8 Mon Sep 17 00:00:00 2001 From: Brian Beck Date: Mon, 22 Dec 2025 06:19:56 -0800 Subject: [PATCH] tweak config comments --- next.config.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/next.config.ts b/next.config.ts index afceefe0..8479af1f 100644 --- a/next.config.ts +++ b/next.config.ts @@ -2,19 +2,21 @@ const { PHASE_DEVELOPMENT_SERVER } = require("next/constants"); module.exports = (phase, { defaultConfig }) => { return { + // Suppress static export config warnings in dev mode as they are not relevant. output: phase === PHASE_DEVELOPMENT_SERVER ? undefined : "export", distDir: phase === PHASE_DEVELOPMENT_SERVER ? undefined : "./docs", basePath: "/t2-mapper", assetPrefix: "/t2-mapper/", trailingSlash: true, headers: + // TorqueScript files should be served as text. This won't affect what + // GitHub Pages does with the static export, but it'll at least improve + // the dev server. Otherwise, the responses can't be easily inspected in + // the Network tab. phase === PHASE_DEVELOPMENT_SERVER ? async () => { return [ { - // TorqueScript files should be served as text. This won't affect what - // GitHub Pages does, but it'll at least improve the dev server. Otherwise, - // the responses can't be easily inspected in the Network tab. source: "/:path*.cs", headers: [ { @@ -26,11 +28,11 @@ module.exports = (phase, { defaultConfig }) => { ]; } : undefined, + // For the dev server, redirect / to the `basePath` for convenience, so you + // can just open localhost:3000. redirects: phase === PHASE_DEVELOPMENT_SERVER ? async () => { - // For the dev server, redirect / to the `basePath` for convenience, so you - // can just open localhost:3000. return [ { source: "/",