Uniswap / interface

🦄 Open source interfaces for the Uniswap protocol
https://app.uniswap.org
GNU General Public License v3.0
4.93k stars 4.99k forks source link

SwapWidget font CSS not included in build #3343

Open mightymatth opened 2 years ago

mightymatth commented 2 years ago

When a React application with SwapWidget is built locally (and/or deployed on IPFS, example here), some fonts cannot be fetched as they are not included in the build.

It plays well when it's deployed to Vercel as it only throws warnings like these:

Failed to decode downloaded font: https://uni-widget-iframe.vercel.app/~@fontsource/inter/files/inter-latin-variable-wghtOnly-normal.woff2

...but the app bootstraps successfully.

However, when I build it locally and upload to IPFS, the mentioned warning becomes an error because the resource cannot be found and results with the error:

Refused to apply style from 'https://bafybeigj6vftgedsms27yfe3ebzhanqnhgrwxic5hug4457mysbka6w5iy.ipfs.dweb.link/~@fontsource/ibm-plex-mono/400.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

@zzmp, I've seen the previous attempt, but I still have this problem.

taylorjdawson commented 2 years ago

Having the same issue not sure how to resolve

T-Damer commented 3 months ago

Same for me, damn, 2 years without a fix, that's crazy