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>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// 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}`);
|
||||
Reference in New Issue
Block a user