qwik icon indicating copy to clipboard operation
qwik copied to clipboard

Can I or Do I need to specify the order of prefetch or which bundle to prefetch?

Open lightersss opened this issue 2 years ago • 1 comments

Is your feature request related to a problem?

prefetch I saw this on the website.

The ideal solution is to only prefetch the smallest amount of code that is highly likely to be executed from a user's interaction, but avoiding any JavaScript that's couldn't be used.

Describe the solution you'd like

I just start to use qwik. I run some examples with npm run preview and I didn't see any prefetch behaviour, like this example https://qwik.builder.io/tutorial/events/basic/, even though there is only one clickable button in the page. I just wonder if I need to specify whether this click event needs to be prefetched or not, like use q:prefetch.

Describe alternatives you've considered

I have no idea. Maybe I miss something in the network?

Additional context

No response

lightersss avatar Nov 11 '22 07:11 lightersss

Prefetch should be happening via a service worker. When JS loads, does it show it coming from the service worker in the network tab?

nnelgxorz avatar Nov 12 '22 23:11 nnelgxorz

This seems to be working as expected.

hamatoyogi avatar Jan 21 '24 11:01 hamatoyogi