TanStackT
TanStack13mo ago
14 replies
progressive-amaranth

Create API route at /sitemap.xml or /manifest.json

I'm trying to figure out how to create a handler that will response to /sitemap.xml or /manifest.json

The difficulties I'm running in to are:
- Wanting /api routes (no root, no layout, not html content-type) at a route other than /api
- Wanting to include the . in the route itself - sitemap.xml.ts maps to /sitemap/xml in Tanstack file routing

Has anyone figured this out?
Was this page helpful?