Open amic81 opened 2 years ago
https://create-react-app.dev/docs/using-the-public-folder
You should put the picture in the src
directory
Ok, but the application structure is exactly that taken from the repository.
The files are under public and in the index.html file the favicon.icon is already linked with the public url href="%PUBLIC_URL%/favicon.ico"
Could it be the version of node I compile with? Which version of node do you recommend?
<link href="/favicon.ico" rel="icon">
will not work in main app, even if its path is incorrect. Because this tag must be placed in the <head>
For favicon.ico
,you can only insert <link href="http://localhost:7100/favicon.ico" rel="icon">
into the <head>
in the mount
function and remove it in the unmout
.
For other pictures, you just need to put it in the src
directory and use it normally
Hi,
I tried your example project at https://github.com/umijs/qiankun, but looking at the sub-apps I saw that for React16 the gets to static resources go into error:
GET - http://localhost:7099/logo192.png GET - http://localhost:7099/favicon.ico
because the url and port are of the main-app (localhost:7099) instead of those of the sub-apps (localhost:7100), how is it possible to solve these error cases?
Thanks