github quasarframework/quasar @quasar/app-vite-v3.7.0

latest release: quasar-v2.25.1
3 hours ago

Changes

  • fix(app-vite): boot files & preFetch -> behavior change: urlPath is now the router-facing URL in every mode. It is path + query (+ hash) as Vue Router sees it, without the publicPath prefix and without hash mode's # wrapper, so you can match it against your routes or feed it straight to router.resolve(). Previously its shape depended on where it was read (raw req.url on the server, window.location on the client), which made every string check mode-dependent: the documented auth-guard example (urlPath.startsWith('/login')) infinite-reload-looped in hash mode and under a non-default publicPath. On top of that, the client-side preFetch hook read window.location during beforeResolve, before vue-router commits the navigation, so every hook saw the PREVIOUS page's URL and a redirect() guarded by urlPath looped until vue-router aborted the navigation. If you need the raw browser URL, use window.location (client-side) or ssrContext.req.url (server-side). The publicPath param is also now passed to the two addPreFetchHooks() call sites that were missing it (SPA-family modes, and SSR/SSG client-side rendered pages), where hooks received undefined (#16423)
  • fix(app-vite): capacitor -> dependencies installed in /src-capacitor are now resolvable from /src code in every mode, not only when running in Capacitor mode. Capacitor plugins ship web implementations, so shared code may import them behind an import.meta.env.QUASAR_CAPACITOR_MODE guard (the guarded branch is dead-code eliminated in production builds) -- that import previously failed to resolve in SPA/PWA/SSR builds. The generated TypeScript compilerOptions.paths mirror this whenever Capacitor mode is installed (#17681)
  • fix(app-vite): ssr/ssg -> Map, Set, Date, RegExp, BigInt and undefined values now survive in the serialized store state. The state was serialized as plain JSON, so Map/Set collapsed to empty objects, Date degraded to a string and undefined values were dropped from window.__INITIAL_STATE__; it is now emitted as a live JS expression, making SSR/SSG state behave identically to SPA mode. HTML-unsafe character escaping is unchanged, and no client runtime or hydration change is needed. Measured cost is roughly 3x the serialization time, which in absolute terms is 34us vs 102us for a 12KB state (about 1ms at 120KB); apps needing full control keep ssr.manualStoreSerialization / manualStoreHydration (#11382)

Donations

Quasar Framework is an open-source MIT-licensed project made possible due to the generous contributions by sponsors and backers. If Quasar is useful in your workflow and you want to support ongoing maintenance, please consider the following:

Don't miss a new quasar release

NewReleases is sending notifications on new releases.