-
-
Notifications
You must be signed in to change notification settings - Fork 148
fix(vite.config.ts): fix font loading bug #294
Conversation
The bug still seems to be present in my local host, but pushing for extras eyes on my code. fix #243
✅ Deploy Preview for hot-sauced-ui ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Compliance Checks Passed!
vite.config.ts
Outdated
@@ -64,8 +64,8 @@ export default defineConfig(({command, mode}: ConfigEnv): UserConfig => { | |||
display: 'swap', | |||
injectTo: 'head-prepend', | |||
families: [ | |||
'Inter:100,200,300,400,500,600,700,800,900', | |||
'Lexend:100,200,300,400,500,600,700,800,900' | |||
'Inter:wght@100,200,300,400,500,600,700,800,900', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should fix it on the deploy preview as well, it was ;
instead of ,
:
'Inter:wght@400;600;900',
'Lexend:wght@400;600;900'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go with this solution rather than mine 😎
vite.config.ts
Outdated
'Inter:wght@100,200,300,400,500,600,700,800,900', | ||
'Lexend:wght@100,200,300,400,500,600,700,800,900' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Inter:wght@100,200,300,400,500,600,700,800,900', | |
'Lexend:wght@100,200,300,400,500,600,700,800,900' | |
// families can be either strings (only regular 400 will be loaded) | |
'Lexend', | |
// or objects | |
{ | |
/** | |
* Family name (required) | |
*/ | |
name: 'Inter', | |
/** | |
* Family styles | |
*/ | |
styles: 'ital,wght@0,400;1,200', | |
/** | |
* enable non-blocking renderer | |
* <link rel="preload" href="xxx" as="style" onload="this.rel='stylesheet'"> | |
* default: true | |
*/ | |
defer: true, | |
}, |
So after looking at the project README, this will work. It loads only the 400 or regular version of Lexend, and multiple versions of Inter.
🎉 This PR is included in version 2.21.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* origin/main: (117 commits) chore(patch): release 2.23.3 [skip ci] fix: correct swr fetcher not throwing on error (#306) chore(patch): release 2.23.2 [skip ci] fix: load more doesn't load repositories (#304) chore(patch): release 2.23.1 [skip ci] fix: dedupe app global user state (#303) chore(minor): release 2.23.0 [skip ci] feat: change title font to open sans bold (#300) chore(minor): release 2.22.0 [skip ci] feat: updated css to respect row in subnav (#298) feat: use async hooks and beta api for hot repos (#296) chore(patch): release 2.21.2 [skip ci] fix(vite.config.ts): correct font loading preload (#294) chore(patch): release 2.21.1 [skip ci] fix: dedupe handleVoteUpdateByRepo function (#292) chore(minor): release 2.21.0 [skip ci] chore(minor): release 2.20.0 [skip ci] feat: make the contributors StackedAvatars component reusable (#290) chore(minor): release 2.19.0 [skip ci] feat: added system notification (#285) ...
The bug still seems to be present in my local host, but pushing for extras eyes on my code.
fix #243
What type of PR is this? (check all applicable)
Description
This PR fixes the font loading bug.
Related Tickets & Documents
Fixes #243
Mobile & Desktop Screenshots/Recordings
I don't see a change in my local host 😅
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
No I don't believe so.
[optional] What gif best describes this PR or how it makes you feel?
I know I'm completely supported and standing in like 5 inches of water, and yet... Life as a junior dev I suppose lol