@frontic/nuxt 1.0 is out, and the releases since have built on it. Composables are fully typed against your generated schema, you can instrument shopper behavior with typed analytics hooks, catch every failed Frontic request, call Frontic from your own server routes, and serve SEO sitemaps and shareable search URLs. Everything that changes behavior is opt-in, except the breaking changes listed below.
What's new
Fully typed composables: useFronticPage, useFronticSearch, useFronticListing, useFronticBlock and useFronticContext resolve their types from your generated client, so invalid fields, sorts and filters fail at typecheck instead of passing through as any. Every data composable exposes a typed error ref.
Analytics hooks: frontic:listing:resolved, frontic:search:committed and frontic:page:resolved fire once per real shopper action, never on a background refresh. The module sends nothing itself; you decide what to track.
Error reporting: frontic:fetch:error fires for every failed call, in the browser and during server rendering, with the operation and the cause. Requests time out after 10 seconds by default.
Server routes: createFronticServerClient from @frontic/nuxt/server calls Frontic from Nuxt API routes and middleware, with the visitor's language and region.
Caching control: data composables accept gcTime, enabled and keepPreviousData and expose asyncStatus. Switching region or locale clears cached data, so content always matches the visitor's context.
SEO sitemaps: sitemap: true serves an XML sitemap per storefront domain, referenced from robots.txt when that integration is on.
Shareable search URLs: urlQuerySync on useFronticSearch keeps the term, sorting, filters and page in the URL and restores them on load and on back/forward.
Before you upgrade
The module now ships Pinia 4 and @pinia/nuxt 1, which need Vue 3.5.11+ and TypeScript 5.6+.
Regenerate your client with @frontic/cli (schemaVersion 2) for full type coverage, then run vue-tsc to find calls that used to pass untyped.
useFronticPage's data is now your generated Page union: narrow on page.type before reading it.
UiFilter.data holds both whole-set and filtered-result stats; update code that read the old single-object shape.
useFronticListing's second argument is only the listing's parameters; move query options such as limit into the third.