Lot of warning in Firefox about : "resource at *** preloaded with link preload was not used within a few seconds"
See original GitHub issueDescribe 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:
- Created 2 years ago
- Comments:11 (1 by maintainers)
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.)
@patak-js yeah sure!