Files
AndreaSlopFotografie/web/config/writeRedirects.ts
T
SluijsensandClaude Sonnet 5.5 5ba6ac8579 Redirects of the old WordPress addresses as redirects.json (format of the CMS host)
The list is in config/redirectRules.ts (exact paths, from the old sitemap),
written into dist/client by the build; check-artifact.sh requires it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 22:15:21 +01:00

11 lines
500 B
TypeScript

// Writes redirects.json next to the pages of the build (the last step of
// pnpm build, after externalizeInlineScripts). Runs directly with Node.
import { mkdirSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
import { redirectsJson } from './redirectRules.ts';
const outDir = process.argv[2] ?? join('dist', 'client');
mkdirSync(outDir, { recursive: true });
writeFileSync(join(outDir, 'redirects.json'), redirectsJson());
console.log(`redirects.json written to ${outDir}`);