0

I am experiencing a very strange behavior. My sitemap is being built and then rebuilt without my loc entries. I am not receiving any errors though...

I added this to my vite.config.ts:

import sitemap from "vite-plugin-sitemap";
import { sitemapOptions } from "./scripts/generate-sitemap";
export default defineConfig(() => {
  return {
    plugins: [
      sitemap(sitemapOptions),
...

This is the content of generate-sitemap.ts in my /script folder:

const getUrlsToInclude = (): string[] => {
  return [
    https://mydomain.io/test1,
    https://mydomain.io/test2
  ];
}
export const sitemapOptions: any = {
  base: "https://mydomain.io",
  fileName: 'sitemap.xml',
  exclude: ['/api'],
  getUrls: () => getUrlsToInclude(),
}; 
jhon dano
  • 660
  • 6
  • 23

0 Answers0