El ícono de la pestaña de mi navegador no aparece después de enviar mi repositorio a github. Aparece bien cuando lo pruebo en localhost.
Aquí está mi código en index.html:
<!DOCTYPE html> <html lang=""> <head> <link rel="icon" href="public/favicon.ico" type="image/x-icon" /> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body { font-family: "Futura-Book"; margin: 0; } </style> </head> <body> <!-- noscript> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> </noscript --> <div id="app"></div> <!-- built files will be auto injected --> </body> </html>
y aquí está la ruta de mi archivo
Agradecería cualquier ayuda y sugerencia, gracias!
El ícono debe estar en la raíz de la carpeta dist. Entonces, eliminar al público del camino debería solucionar el problema.
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
Si no funciona, cambie el nombre de favicon.ico a otro.
<link rel="shortcut icon" href="something.ico" type="image/x-icon" />