Im wondering about the best way to import svg image to be used as favicon in react
i have following code, which works:
import { favicon } from './static/favicon'
<link href="${favicon}" rel="shortcut icon" />
But here, favicon icon is exported const from .ts file:
export const favicon = `
data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...0Y/QTN1SKbITsFi0AAAAASUVORK5CYII=
`;
I was wondering if i can somehow just use .svg file and export that to be used?
if i try to do:
import favicon2 from './static/favicon.svg'
<link href="${favicon2}" rel="shortcut icon" />
i will get function%20SvgFavicon(props)%20%7B%20%20return%20/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[
error in the console.