builder icon indicating copy to clipboard operation
builder copied to clipboard

Nuxt 3 examples preview environment broken for initial SSR loads [Fix attached]

Open klngrs opened this issue 6 months ago • 1 comments

The Nuxt 3 and Nuxt 3 catch all solutions (here and here) do not work out of the box for SSR because preview query parameters are not passed to isPreviewing().

To reproduce:

  1. Implement one of the Nuxt 3 examples above in an SSR Nuxt 3 app.
  2. Attempt to access a page through the builder.io preview environment

Result: It'll say "Content not found" or you'll get the error pop-up that something is not configured correctly.

Fun note: If you update your app locally, HMR triggers a client update which then DOES trigger a working client call with fetchOneEntry - enabling the preview environment to work. The initial impression is a flaky builder preview environment that sometimes works and sometimes does not (no good!).

To fix: const route = useRoute(); Pass query params to isPreviewing as follows... isPreviewing(route.query)

PR incoming

klngrs avatar Jul 31 '25 16:07 klngrs

PR: https://github.com/BuilderIO/builder/pull/4125

klngrs avatar Aug 01 '25 19:08 klngrs