@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,useFronticBlockanduseFronticContextresolve their types from your generated client, so invalid fields, sorts and filters fail at typecheck instead of passing through asany. Every data composable exposes a typederrorref. - Analytics hooks:
frontic:listing:resolved,frontic:search:committedandfrontic:page:resolvedfire once per real shopper action, never on a background refresh. The module sends nothing itself; you decide what to track. - Error reporting:
frontic:fetch:errorfires 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:
createFronticServerClientfrom@frontic/nuxt/servercalls Frontic from Nuxt API routes and middleware, with the visitor's language and region. - Caching control: data composables accept
gcTime,enabledandkeepPreviousDataand exposeasyncStatus. Switching region or locale clears cached data, so content always matches the visitor's context. - SEO sitemaps:
sitemap: trueserves an XML sitemap per storefront domain, referenced from robots.txt when that integration is on. - Shareable search URLs:
urlQuerySynconuseFronticSearchkeeps 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/nuxt1, which need Vue 3.5.11+ and TypeScript 5.6+. - Regenerate your client with
@frontic/cli(schemaVersion 2) for full type coverage, then runvue-tscto find calls that used to pass untyped. useFronticPage'sdatais now your generatedPageunion: narrow onpage.typebefore reading it.UiFilter.dataholds 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 aslimitinto the third.
One mail when something ships.
Product updates in your inbox, roughly once a week, never more.
Unsubscribe any time, one click.