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

[Bug]: Console Warning : Resource was preloaded but not used within a few seconds #69

Open
1Luc1 opened this issue May 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@1Luc1
Copy link

1Luc1 commented May 13, 2024

Demo URL

No response

What happened?

I set up a FontSource like described within the ReadMe. In particularly I used the variable fontsource "@fontsource-variable/source-serif-4": "^5.0.19"

This Warning shows only if the app is build. Within development this warning does not appear.

I don't know if this is related to #64 or not; this is why I upvoted/promoted that issue.

vue v3.4.27
vite v5.2.11
unplugin-fonts v1.1.1

Reproduction steps

  1. install unplugin-fonts v1.1.1
  2. install fontsource (e.g. @fontsource-variable/source-serif-4)
  3. setup unplugin-fonts to use fontsource within vite.config.mjs
    Unfonts({
      fontsource: {
        families: ["Source Serif 4 Variable"],
      },
    }),
  1. import unfonts style within main.js import "unfonts.css";

  2. use font somewhere within app

   html {
    font-family: "Source Serif 4 Variable", sans-serif;
  }

Relevant log output

The resource [URL *.eot, *.woff2, *.woff, *.ttf] was
preloaded using link preload but not used within a few seconds from the
window's load event. Please make sure it has an appropriate `as` value and
it is preloaded intentionally.

What browsers are you seeing the problem on?

Firefox, Microsoft Edge, Other

What is your operating system?

Windows, Linux

@1Luc1 1Luc1 added the bug Something isn't working label May 13, 2024
Young-Lord added a commit to Young-Lord/online-clipboard that referenced this issue May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant