A Vite plugin that automatically generates a sitemap.xml from your TanStack Router routes.
npm install --save-dev vite-plugin-tanstack-router-sitemap
In your vite.config.ts:
import { defineConfig } from "vite";
import sitemapPlugin from "vite-plugin-tanstack-router-sitemap";
export default defineConfig({
plugins: [
sitemapPlugin({
hostname: "https://yourdomain.com",
routes: {
"/": {
changefreq: "daily",
priority: 1.0,
},
},
}),
],
});