tweak config comments

This commit is contained in:
Brian Beck 2025-12-22 06:19:56 -08:00
parent 9c7f5f4cb5
commit f0e34caa25

View file

@ -2,19 +2,21 @@ const { PHASE_DEVELOPMENT_SERVER } = require("next/constants");
module.exports = (phase, { defaultConfig }) => { module.exports = (phase, { defaultConfig }) => {
return { return {
// Suppress static export config warnings in dev mode as they are not relevant.
output: phase === PHASE_DEVELOPMENT_SERVER ? undefined : "export", output: phase === PHASE_DEVELOPMENT_SERVER ? undefined : "export",
distDir: phase === PHASE_DEVELOPMENT_SERVER ? undefined : "./docs", distDir: phase === PHASE_DEVELOPMENT_SERVER ? undefined : "./docs",
basePath: "/t2-mapper", basePath: "/t2-mapper",
assetPrefix: "/t2-mapper/", assetPrefix: "/t2-mapper/",
trailingSlash: true, trailingSlash: true,
headers: 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 phase === PHASE_DEVELOPMENT_SERVER
? async () => { ? async () => {
return [ 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", source: "/:path*.cs",
headers: [ headers: [
{ {
@ -26,11 +28,11 @@ module.exports = (phase, { defaultConfig }) => {
]; ];
} }
: undefined, : undefined,
// For the dev server, redirect / to the `basePath` for convenience, so you
// can just open localhost:3000.
redirects: redirects:
phase === PHASE_DEVELOPMENT_SERVER phase === PHASE_DEVELOPMENT_SERVER
? async () => { ? async () => {
// For the dev server, redirect / to the `basePath` for convenience, so you
// can just open localhost:3000.
return [ return [
{ {
source: "/", source: "/",