Tengo un problema con mi sitio, una vez que construyo el proyecto con el paquete, cuando alojo el sitio con páginas de github, algunas imágenes SVG importadas (por ejemplo, como imagen de fondo en css) o algunas etiquetas SVG (en un archivo html) no se cargan .
Por ejemplo, el siguiente SVG no está cargado:
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev/svgjs" id= "clickPad1" height="210px" width="210px" class="" style="position: absolute; top:-5px; left:-5px;> <circle id="circleClick" r ="5" fill="white"></circle> </svg>En su lugar, se carga lo siguiente:
<svg style="position: fixed; top:35px; left:36px" width="20" height="20"> <circle r="2" fill="black"> <animate attributeName="cx" values="2;8;3;5;4;2" dur="8s" repeatCount="indefinite" /> <animate attributeName="cy" values="2;3;2;8;5;2" dur="10s" repeatCount="indefinite" /> </circle> </svg>En el primer svg, al círculo le faltan los atributos cx y cy. Ahora, no conozco el contexto, pero asegúrese de que el color de relleno sobresalga. Lo cambié a negro. Al atributo de estilo en <svg> le faltaban las comillas ("). Los atributos con y altura no necesitan el tipo de longitud (px).
<svg xmlns="http://www.w3.org/2000/svg" id="clickPad1" height="210" width="210" style="position: absolute; top:-5px; left:-5px;"> <circle id="circleClick" cx="20" cy="20" r="5" fill="black"/> </svg>