When I am running my script to generate sitemap. Also i wanted to know how can we use jquery in react js while It's showing SyntaxError: Invalid or unexpected token. If i am removing my image then is showing error on next Image.
And my script for sitemap is here using library react-router-sitemap-generator. And using react-router v6 library for routing.
import Generator from 'react-router-sitemap-generator';
import Router from './webRoute'; //import your react router component
const generator = new Generator(
'https://devreact.dhurina.net/',
Router(),
{
lastmod: new Date().toISOString().slice(0, 10),
changefreq: 'monthly',
priority: 0.8,
}
);
generator.save('public/sitemap.xml');