Packages

@builder.io/qwik

1.20.4 · 9 Nov 2026MIT75.8k / weekRepositoryHomepagenpmAtom feed

Your version

1.14.0

21 May 2025Where it was published

1.20.4 is the newest release of 1.x.

In short

1 new2 fixed

Security

2 advisories affect 1.14.0; 1.20.0 fixes them

Release note

Minor Changes

  • ✨ Major improvements to prefetching with automatic bundle preloading

    • This removes the need for service workers, and instead utilize modulepreload link tags for better browser integration.

    • Improves initial load performance by including dynamic imports in the prefetch

    • Reduces complexity while maintaining similar (and even better) functionality

    • Enables some preloading capabilities in dev mode (SSR result only)

    • Includes path-to-bundle mapping in bundle graph (this improves the experience using the <Link> component, AKA "single page app" mode)

    • Server now has built-in manifest support (so no need to pass manifest around)

    • Moves insights-related build code to insights plugin


    ⚠️ ATTENTION:

    • Keep your service worker code as is (either <ServiceWorkerRegister/> or <PrefetchServiceWorker/>).

    • Configure your server to provide long caching headers.

    Service Worker:

    This new implementation will use it to uninstall the current service worker to reduce the unnecessary duplication.

    The builtin service workers components are deprecated but still exist for backwards compatibility.

    ⚠️ IMPORTANT: Caching Headers:

    The files under build/ and assets/ are named with their content hash and may therefore be cached indefinitely. Typically you should serve build/* and assets/* with Cache-Control: public, max-age=31536000, immutable.

    However, if you changed the rollup configuration for output filenames, you will have to adjust the caching configuration accordingly.


    You can configure the preload behavior in your SSR configuration:

    // entry.ssr.ts
    export default function (opts: RenderToStreamOptions) {
      return renderToStream(<Root />, {
        preload: {
          // Enable debug logging for preload operations
          debug: true,
          // Maximum simultaneous preload links
          maxIdlePreloads: 5,
          // Minimum probability threshold for preloading
          preloadProbability: 0.25
          // ...and more, see the type JSDoc on hover
        },
        ...opts,
      });
    }

Optional for legacy apps

For legacy apps that still need service worker functionality, you can add it back using:

```bash
npm run qwik add service-worker
```

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.

Patch Changes

  • 🐞🩹 linting errors which were previously being ignored across the monorepo.

  • 🐞🩹 now qwikloader is loaded only once in all cases

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.