@quasar/app-vite-v3.7.0
·
2 commits
to dev
since this release
Changes
- fix(app-vite): boot files & preFetch -> behavior change:
urlPathis now the router-facing URL in every mode. It ispath + 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 torouter.resolve(). Previously its shape depended on where it was read (rawreq.urlon the server,window.locationon 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 readwindow.locationduringbeforeResolve, before vue-router commits the navigation, so every hook saw the PREVIOUS page's URL and aredirect()guarded byurlPathlooped until vue-router aborted the navigation. If you need the raw browser URL, usewindow.location(client-side) orssrContext.req.url(server-side). ThepublicPathparam is also now passed to the twoaddPreFetchHooks()call sites that were missing it (SPA-family modes, and SSR/SSG client-side rendered pages), where hooks receivedundefined(#16423) - fix(app-vite): capacitor -> dependencies installed in
/src-capacitorare now resolvable from/srccode in every mode, not only when running in Capacitor mode. Capacitor plugins ship web implementations, so shared code may import them behind animport.meta.env.QUASAR_CAPACITOR_MODEguard (the guarded branch is dead-code eliminated in production builds) -- that import previously failed to resolve in SPA/PWA/SSR builds. The generated TypeScriptcompilerOptions.pathsmirror this whenever Capacitor mode is installed (#17681) - fix(app-vite): ssr/ssg ->
Map,Set,Date,RegExp,BigIntandundefinedvalues now survive in the serialized store state. The state was serialized as plain JSON, soMap/Setcollapsed to empty objects,Datedegraded to a string andundefinedvalues were dropped fromwindow.__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 keepssr.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: