Skip to content

Conversation

@hi-ogawa
Copy link
Collaborator

@hi-ogawa hi-ogawa commented Sep 27, 2025

This PR exposes the list of font urls to be preloaded via virtual module fontless/runtime. This approach assumes the css file is transformed on server environment.

(Note that, until #655 lands, the preloaded font isn't the one actually used, so it's not effective yet.)

TODO

@netlify
Copy link

netlify bot commented Sep 27, 2025

Deploy Preview for fontless failed.

Name Link
🔨 Latest commit d72f8e6
🔍 Latest deploy log https://app.netlify.com/projects/fontless/deploys/68db7e843a6651000856bbe6

@codecov
Copy link

codecov bot commented Sep 27, 2025

Codecov Report

❌ Patch coverage is 3.48837% with 83 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.70%. Comparing base (d66809d) to head (d72f8e6).

Files with missing lines Patch % Lines
packages/fontless/src/vite.ts 2.38% 82 Missing ⚠️
packages/fontless/src/runtime.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #651      +/-   ##
==========================================
- Coverage   53.40%   48.70%   -4.71%     
==========================================
  Files          11       12       +1     
  Lines         734      809      +75     
  Branches       93       94       +1     
==========================================
+ Hits          392      394       +2     
- Misses        342      415      +73     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 28, 2025

Open in StackBlitz

npm i https://pkg.pr.new/fontaine@651
npm i https://pkg.pr.new/fontless@651

commit: d72f8e6

@hi-ogawa hi-ogawa changed the title feat(fontless): expose preload fonts via fontless/runtime feat(fontless): expose preload fonts to server runtime Sep 30, 2025
@hi-ogawa hi-ogawa marked this pull request as ready for review September 30, 2025 06:56
@hi-ogawa hi-ogawa requested a review from danielroe as a code owner September 30, 2025 06:56
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

Successfully merging this pull request may close these issues.

[fontless] support preload for ssr app [fontless] Support SvelteKit

1 participant