Vite Plugin Automates Sitemap and Robots.txt Generation at Build Time
A new npm package called @3ni8ma/vite-plugin-sitemap integrates with the Vite build tool to automatically generate sitemap.xml and robots.txt files during every build. Developers declare their site routes once in the Vite config, and the plugin emits an up-to-date sitemap into the output directory without manual intervention. The plugin supports configurable options including change frequency, crawl priority, last-modified date, and paths to disallow for search engine crawlers. It has zero runtime dependencies and operates entirely at build time, making it lightweight for static site projects. The tool aims to eliminate the common problem of outdated or missing sitemaps that can delay search engine indexing of newly published pages.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in