Closed webda2l closed 6 months ago
Hi @webda2l, this isn't an issue that happens to every Next.js 14 + Prismic website, thus I am not sure we should make { ssr: false }
the default.
Could you provide details on your setup and what you think could be causing it? A reproduction project would be best so we can investigate it further.
In the meantime, you could also try disabling lazy loading via next/dynamic
by modifying your slicemachine.config.json
file like this:
// slicemachine.config.json
{
"adapter": {
"name": "@slicemachine/adapter-next",
"options": {
"lazyLoadSlices": false
}
}
}
Yes it's certainly a particular case. (NextJS14 still using page router & webpack/babel).
After rm .next
directory, the build failed on a random page and always the slice-simulator.tsx
that follow standard.
Feel free to close the issue, even close it still help if someone find it.
Because it's not directly related to Prismic, I hope a fix on NextJs side, but if doesn't come, maybe add a new adapter.option to enable { ssr: false }
or reuse the lazyLoadSlices option to this goal instead its current as improvement?
Thank you. Yes we will close this issue and see if we need to add an option in the future.
See https://github.com/vercel/next.js/issues/58576#issuecomment-1936062020 and so, I think the
{ ssr: false }
should be use during slices/index.ts generation. Tried a lots of others things... and it's definitly the root cause.Versions