github QwikDev/qwik @qwik.dev/router@2.0.0-beta.29

pre-release8 hours ago

Major Changes

  • BREAKING: The route configuration object has changed. The routes are now a more efficient trie structure and the config no longer includes menus. This should not impact you. (by @wmertens in #8414)

Minor Changes

  • ✨ SSG now runs in a separate process using Workers, and it can be re-run by running server/run-ssg.js (by @wmertens in #8414)

  • ✨ eTag and in-memory cache for SSR pages. You can define an eTag property on your page modules, which will be used to generate an ETag header for the response, and which is checked before rendering the page, returning 304 if possible. (by @wmertens in #8414)
    If you define a cacheKey function on your page module, it will be used to generate a cache key for the page, which is used to store the rendered HTML in an in-memory cache. This allows for faster responses for pages that are expensive to render and do not change often. The cache can be cleared using the clearSsrCache function from the request handler middleware.

  • ✨ Add routeConfig export as a unified alternative to separate head, eTag, and cacheKey exports (by @wmertens in #8414)

    The new routeConfig export groups all page-level configuration into a single export with the same resolution rules as head (static object or function). When a module exports routeConfig, separate head, eTag, and cacheKey exports on that module are ignored.

  • ✨ Custom 404.tsx error pages are now shown in dev mode, and you can now also create error.tsx pages for other HTTP status codes. (by @wmertens in #8414)
    Read the HTTP status with useHttpStatus().

Patch Changes

  • fix(router): make sure css gets found on the correct module graph (by @saboooor in #8423)

  • Updated dependencies []:

    • @qwik.dev/core@2.0.0-beta.29

Don't miss a new qwik release

NewReleases is sending notifications on new releases.