The problem of adding ico icons to projects built by vue-cli

is the small icon project of the website above the browser, which is the ico icon built with vue-cli. I added it in the index.html of the root directory, but after I packed it up and went online, I always reported that I couldn"t find it and sometimes the icon could be displayed, and sometimes I couldn"t help but know if it was written incorrectly or somehow

.
Mar.04,2021

when you develop, put .ico in the same directory as the index.html project, then. / favicon.ico can be found.
Note: after being packaged and launched, you should only deploy the files in the dist directory! Then vue-cli will not deal with the resource files in this directory.
suggestion: put favicon.ico in the static directory and introduce href= ". / static/favicon.ico"

into the page.
Menu