Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qiankun examples #1825

Open
amic81 opened this issue Nov 19, 2021 · 3 comments
Open

Qiankun examples #1825

amic81 opened this issue Nov 19, 2021 · 3 comments

Comments

@amic81
Copy link

amic81 commented Nov 19, 2021

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

@gongshun
Copy link
Collaborator

https://create-react-app.dev/docs/using-the-public-folder

image

You should put the picture in the src directory

@amic81
Copy link
Author

amic81 commented Nov 19, 2021

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"

image

Could it be the version of node I compile with? Which version of node do you recommend?

@gongshun
Copy link
Collaborator

<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>

image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants