question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lot of warning in Firefox about : "resource at *** preloaded with link preload was not used within a few seconds"

See original GitHub issue

Describe the bug

Hello, we are building a single page application in vue.js with vite.

According to the doc : Vite automatically generates <link rel="modulepreload"> directives for entry chunks and their direct imports in the built HTML.

However Firefox is not supporting modulepreload so it’s look like vite is generating automatically the following on Firefox : <link rel="preload" as="script" crossorigin="" href="/assets/Component.469e8f3b.js"> which create the following warning : The resource at “***/assets/Component.469e8f3b.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly.

We don’t have any warning in chrome who is injecting the following in the html : <link rel="modulepreload" as="script" crossorigin="" href="/assets/Component.469e8f3b.js">

but in Firefow we have a lot of them and it’s quiet annoying. Do you have a solution for us ?

Reproduction

I guess that you will have this warning for all singlePage App with vuejs. If really needed I can share by personnal message the url of our app.

System Info

  System:
    OS: Windows 10 10.0.19042
    CPU: (8) x64 Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz
    Memory: 1.40 GB / 5.89 GB
  Binaries:
    Node: 16.0.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 7.14.0 - ~\Desktop\Genario\genario-frontend\node_modules\.bin\npm.CMD
  Browsers:
    Chrome: 91.0.4472.77
    Edge: Spartan (44.19041.964.0), Chromium (90.0.818.66)
    Internet Explorer: 11.0.19041.1
  npmPackages:
    @vitejs/plugin-vue: ^1.2.1 => 1.2.2
    vite: ^2.1.5 => 2.3.4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
johnpangaloscommented, Jun 18, 2021

I am also seeing this error, I will try and reproduce in a small github repo (as it needs to be built so codesandbox seems less appropriate.)

1reaction
johnpangaloscommented, Jun 30, 2021

@patak-js yeah sure!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firefox complains that preload was not used within a few ...
Firefox logs a warning in the browser console that the preload was not used within a few seconds. Expected results: Firefox should not...
Read more >
Fix "resource preloaded but not used" warning in Chrome
"The resource was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it...
Read more >
Resource Preloaded With Link Preload Was Not Used
I've noticed the following warning in Firefox and Chrome console: The resource at ... preloaded with link preload was not used within a...
Read more >
Common problems with rel="preload" - DebugBear
The resource https://fonts.googleapis.com/css2?family=Ranchers was preloaded using link preload but not used within a few seconds from the ...
Read more >
preloading font with rel preload - Stack Overflow
The resource https://example.com/new-v8/fonts/32A0E0.woff2 was preloaded using link preload but not used within a few seconds from the window's ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found