expo / google-fonts

Use any of the 1000+ fonts (and their variants) from fonts.google.com in your Expo app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fonts aren't loading in web

sscssc11 opened this issue · comments

I'm using two fonts, inter and oswald. Everything works fine on native ios and android, but on web the fonts do not load. I don't know what the root cause is, but console logging the font says

Screenshot 2023-10-17 at 11 59 42 AM

But if I look in the file structure I don't see a media folder under static. Only "js", which has "bundle.js":

Screenshot 2023-10-17 at 12 01 18 PM

There is no error anywhere, and the font family is reference as such:

Screenshot 2023-10-17 at 12 29 58 PM

but it just loads some default serif font.

Is there something related to webpack that I don't know about? Running "expo export:web" does create a "static/media" folder with the correct files.

Expo: 49.0.10
@expo-google-fonts/inter: ^0.2.3
@expo-google-fonts/oswald: "^0.2.3
@expo/webpack-config: ^19.0.0