Find the Vite plugins here. They make sitemaps for Vite projects super easy. They help users and search engines find stuff on your site easily. Makes your website better and saves you time.
Install with npm
npm i -D vite-sitemapor Install with yarn
yarn add vite-sitemapor Install with pnpm
pnpm install vite-sitemapUse the vite plugin in your project go to vite.config.js or vite.config.ts and add the following to code in vite plugin section
sitemap({
baseURL: 'www.example.com',
urls: [
"about",
"privacy-policy",
'term-and-conditions',
...
],
}),Plugin section example in vite.config.ts or js
import { defineConfig } from 'vite';
import sitemap from 'vite-sitemap';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
sitemap({ baseURL: 'www.example.com' })
],
});