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

Two react apps, only one can import fonts #561

Closed
frkboak opened this issue May 10, 2024 · 3 comments
Closed

Two react apps, only one can import fonts #561

frkboak opened this issue May 10, 2024 · 3 comments

Comments

@frkboak
Copy link

frkboak commented May 10, 2024

Describe the bug
We have two react apps running on the same page, each of which is importing FontAwesomeIcon from @fortawsome/react-fontawesome and fonts from @fortawesome/pro-regular-svg-icons.

When just one of the react apps is running on a page, icons display just fine.

When both react apps are running on the same page, only one is able to display icons. In the other one, we get undefined for any icons we import from @fortawesome/pro-regular-svg-icons

(we tested importing free icons and they have the same problem)

Reproducible test case
Can't really share sample code, sorry.

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

Windows 10

  • Brave
  • 1.65.114

(also Chrome 124.0.6367.156 and Firefox 125.0.3)

Additional context
Add any other context about the problem here.

@sachinrepaswal
Copy link

Try isolating the imports of @fortawesome/react-fontawesome and @fortawesome/pro-regular-svg-icons within each React app. This means that each app should have its own instance of these imports, rather than sharing them globally.

@frkboak
Copy link
Author

frkboak commented May 10, 2024

thanks. sounds like I probably need to teach myself webpack, which is what we're using to build these apps

@robmadole
Copy link
Member

I can re-open this if there turns out to be a problem with this library.

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

3 participants