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>
11 lines
500 B
TypeScript
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}`);
|