qwik
qwik copied to clipboard
[🐞] Qwik fails to prefetch leading to input delay
Which component is affected?
Qwik Runtime
Describe the bug
I have been running into this issue since around v0.18.0 and have spent maybe 20+ hours trying to work out what has been going on.
Qwik fails to preload the Javascript which leads to an interaction delay. This only occurs on the first load. It works perfectly fine after the service worker has cached the file. I have provided a reproduction which shows the issue.
Reproduction
https://github.com/EamonHeffernan/qwik-prefetch-issue
Steps to reproduce
pnpm install pnpm build pnpm run deploy
Once deployed, click the green square. This will load instantly as it should. Wait for any preloading to occur, press the red button. There will be a delay as javascript is fetched from the server to display the text.
System Info
System:
OS: Linux 5.10 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Memory: 10.02 GB / 12.42 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 19.8.1 - /usr/bin/node
Yarn: 1.22.19 - /usr/bin/yarn
npm: 9.5.1 - /usr/bin/npm
npmPackages:
@builder.io/qwik: ^1.1.0 => 1.1.0
@builder.io/qwik-city: ^1.1.0 => 1.1.0
undici: 5.22.0 => 5.22.0
vite: 4.3.5 => 4.3.5
Additional Information
No response