Skip to content

Commit a0b1d7b

Browse files
author
wuls
committed
fix conflict
2 parents f97401d + 2d2d9a4 commit a0b1d7b

File tree

238 files changed

+8919
-4880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+8919
-4880
lines changed

.changeset/afraid-months-mix.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/approach-bed-gift.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/breezy-toes-help.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/cyan-deers-glow.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/fair-cars-fry.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
'@builder.io/qwik': minor
3+
---
4+
5+
FEAT: Major improvements to prefetching with automatic bundle preloading
6+
7+
- This removes the need for service workers, and instead utilize `modulepreload` link tags for better browser integration.
8+
- Improves initial load performance by including dynamic imports in the prefetch
9+
- Reduces complexity while maintaining similar (and even better) functionality
10+
- Enables some preloading capabilities in dev mode (SSR result only)
11+
- Includes path-to-bundle mapping in bundle graph (this improves the experience using the `<Link>` component, AKA "single page app" mode)
12+
- Server now has built-in manifest support (so no need to pass `manifest` around)
13+
- Moves insights-related build code to insights plugin
14+
15+
---
16+
17+
⚠️ **ATTENTION:**
18+
19+
**Keep** your service worker code as is (either `<ServiceWorkerRegister/>` or `<PrefetchServiceWorker/>`).
20+
21+
This new implementation will use it to uninstall the current service worker to reduce the unnecessary duplication.
22+
23+
The builtin service workers components are deprecated but still exist for backwards compatibility.
24+
25+
---
26+
27+
You can configure the prefetch behavior in your SSR configuration:
28+
29+
```ts
30+
// entry.ssr.ts
31+
export default function (opts: RenderToStreamOptions) {
32+
return renderToStream(<Root />, {
33+
prefetchStrategy: {
34+
implementation: {
35+
// Enable debug logging for prefetch operations
36+
debug: true,
37+
// Maximum simultaneous preload links
38+
maxSimultaneousPreloads: 5,
39+
// Minimum probability threshold for preloading
40+
minPreloadProbability: 0.25
41+
},
42+
},
43+
...opts,
44+
});
45+
}
46+
```
47+
48+
For legacy apps that still need service worker functionality, you can add it back using:
49+
50+
```bash
51+
npm run qwik add service-worker
52+
```
53+
54+
This will add a basic service worker setup that you can customize for specific caching strategies, offline support, or other PWA features beyond just prefetching.

.changeset/forty-bats-rule.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/furry-paint-spin.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/giant-lobsters-sip.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/loud-fish-walk.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/maiieul-manual-changeset-2.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)