№ 03 · Projects · active
Vite Plugin Sitemap
TypeScript-first Vite plugin for generating XML sitemaps from file-based conventions with zero runtime footprint.
- Created
- Stack
- TypeScriptViteSEOnpm
- Site
- pyyupsk.github.io/vite-plugin-sitemap/
- Source
- pyyupsk/vite-plugin-sitemap
A Vite plugin that generates XML sitemaps at build time from a file-based convention. Supports async route fetching, auto-splitting for large sitemaps (50,000+ URLs), and Google extensions for images, videos, news, and hreflang. Nothing ships to the browser.
Usage
// vite.config.ts
import { defineConfig } from "vite";
import sitemap from "@pyyupsk/vite-plugin-sitemap";
export default defineConfig({
plugins: [
sitemap({
hostname: "https://example.com",
}),
],
});Define routes in src/sitemap.ts or fetch them from an API at build time. CLI tools included for validation and preview.
Published as @pyyupsk/vite-plugin-sitemap on npm.