SyntaxError: Invalid or unexpected token for png image React Js while generating sitemap for website
Asked Answered
S

0

7

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.This is the screenshot of error

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');
Stanger answered 9/5, 2022 at 9:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.