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

feat: disable font preloading option in qwikVite #7297

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thejackshelton
Copy link
Member

@thejackshelton thejackshelton commented Jan 29, 2025

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos
  • Infra

Description

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

@thejackshelton thejackshelton requested a review from a team as a code owner January 29, 2025 16:27
Copy link

changeset-bot bot commented Jan 29, 2025

⚠️ No Changeset found

Latest commit: 0cb84d6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@thejackshelton
Copy link
Member Author

cc @QwikDev/core-veterans the font preloading code will be removed entirely post v2 and replaced with fontless.

I was considering doing an e2e test that verifies the link tags existence, but if this code is going to be removed entirely in v2, maybe a test in vitest with a mock of whether the code executes or not would be better?

I have verified that when disableFontPreload: true is set in qwikVite that it no longer preloads these fonts.

I should also mention that the code that preloads these fonts is already flaky as is, some self hosted fonts don't get preloaded altogether, so this functionality is currently brittle to begin with. I have a demo project that was able to reproduce the font preloading behavior.

@thejackshelton thejackshelton marked this pull request as draft January 29, 2025 16:31
Copy link

pkg-pr-new bot commented Jan 29, 2025

Open in Stackblitz

npm i https://pkg.pr.new/@builder.io/qwik@7297
npm i https://pkg.pr.new/@builder.io/qwik-city@7297
npm i https://pkg.pr.new/eslint-plugin-qwik@7297
npm i https://pkg.pr.new/create-qwik@7297

commit: 0cb84d6

Copy link
Contributor

github-actions bot commented Jan 29, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 0cb84d6

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.

1 participant