@qwik.dev/router@2.0.0-beta.38
Pre-releaseMajor Changes
-
BREAKING: 404.tsx and error.tsx now render inside their layouts (with
@layout/!modifiers), a route miss resolves the nearest 404.tsx, and the 404 page is prerendered for static hosts. Rename404.tsxto404!.tsxif you do not want to add the layout. (by @briancarbone in #8762) -
BREAKING: SPA view transitions are now opt-in; set
viewTransition={true}onQwikRouterProviderto re-enable them. (by @maiieul in #8778) -
✨ relocate built assets with output.assetFileNames; remove build.assetsDir handling (by @maiieul in #8817)
-
✨ rename the
LinkprefetchBundleprop toprefetchBundles(by @maiieul in #8828)
Minor Changes
-
feat(router): automatically omit fully-prerendered, server-free routes from the production SSR route plan so their chunks tree-shake out of size-capped server bundles. (by @briancarbone in #8742)
-
✨ route loaders gain a
blockSSRoption (defaulttrue); setblockSSR: falseto run a loader in the background without blocking SSR (experimental, requires theblockSSRfeature flag) (by @wmertens in #8793) -
✨ returning
ev.redirect(),ev.error()orev.rewrite()from a loader, action, request handler or server function now behaves the same as throwing them (by @wmertens in #8775) -
feat(router): add an
excludeoption torewriteRoutesto skip generating localized routes for matching path patterns. (by @briancarbone in #8751) -
✨ render SSG in a dedicated Vite build environment, so prerendered route code stays out of the deployed server bundle (by @briancarbone in #8760)
SSG now runs from the
buildAppstep of the Vite builder. The Qwik CLI and adapters already build viacreateBuilder().buildApp(), so they need no change. Code that prerenders by calling Vite's programmaticbuild()directly must switch tobuilder.buildApp(), otherwise the SSG step is silently skipped. -
✨ add configurable server request body limits (by @Varixo in #8839)
Patch Changes
-
🐞🩹 render navigation state before loading the next route (by @Varixo in #8821)
-
🐞🩹 prerendered routes are now correctly excluded from the server route plan (by @briancarbone in #8759)
-
fix(router): honor the
routeLoader$idoption so loaders created through a shared wrapper (which share one optimizer-assigned QRL hash) get distinct ids instead of all but the first being silently deduped ingetModuleRouteLoaders. A dev-mode warning is now logged when two distinct loaders share an id. (by @maiieul in #8749) -
🐞🩹 prevent cold dev route loader requests from failing during SPA navigation (by @Varixo in #8787)
-
🐞🩹 keep expiring loader responses private by default (by @Varixo in #8839)
-
🐞🩹 resolve image jsx imports with extra query parameters. (by @Varixo in #8753)
-
🐞🩹 avoid prefetching loader data already fetched by route loaders (by @wmertens in #8836)
-
🐞🩹 keep Azure response collection work proportional to output size (by @Varixo in #8839)
-
🐞🩹 keep deeply nested form parsing work proportional (by @Varixo in #8839)
-
🐞🩹 ensure SPA navigation correctly refreshes route loader data for catch-all routes, including when loader data is shared through context (by @Varixo in #8748)
-
🐞🩹 routeLoader$ fail() now sets the loader value to { failed } instead of throwing an error, as it was before. (by @wmertens in #8756)
-
🐞🩹 prerendered route loaders no longer 404 when the client and server are built as separate processes (by @briancarbone in #8760)
-
🐞🩹 route loader no longer resolves to undefined on the first dev SPA navigation (by @briancarbone in #8770)
-
🐞🩹
routeLoader$not re-running during SPA navigation between URLs that match the same catchall route (by @Varixo in #8730) -
🐞🩹 prefix dev CSS and HMR URLs with Vite base (by @Varixo in #8837)
-
🐞🩹 refetch re-exported route loaders after navigation (by @wmertens in #8792)
-
🐞🩹 route action type allows
invalidatewithout validators (by @wmertens in #8807) -
🐞🩹 preserve scroll after spa action submits (by @Varixo in #8797)
-
🐞🩹 hot-reload route-imported CSS in dev without a server restart (by @briancarbone in #8725)
-
🐞🩹 streaming server$ no longer crashes the Bun server on client disconnect (by @aggyomfg in #8798)
-
🐞🩹 register aliased server functions used only in client code like visible tasks (by @Varixo in #8818)
-
🐞🩹 adapter post-build runs with ssg disabled, and the ssg build skips minify/sourcemaps (by @wmertens in #8806)
-
🐞🩹 the ssg build no longer bundles the unused deploy server entry (by @wmertens in #8806)
-
🐞🩹 a prerendered route's loader with no static sidecar now falls through to SSR instead of failing as a missing static asset (by @briancarbone in #8760)
-
🐞🩹 preserve strict loader URL isolation during route resolution (by @wmertens in #8836)
-
🐞🩹 ensure dev SPA navigation loads route loader data correctly for catch-all and base-prefixed routes (by @Varixo in #8805)
-
Updated dependencies [
96fe9e1,b0bdbf3,77ae28f,dbdf85f,570aec5,b5a74df,3672ae5,2e2a913,1921d7a,8e75051,e28ae7c,3710734,e9d5d98,12387da,e70b299,9fd1303,bed0127,1da9aa6,f9a0e83,2a47192,3a0df67,ee013ae,d3b6678,885367a,8fc5762,03fae8a,fd9f197,4917019,abaae23,15ea2d8]:- @qwik.dev/core@2.0.0-beta.38