On a site completed last year the previews work. All that was done was going into Prismic and configuring the preview to use the /preview path (no preview.vue was created and no preview configuration in nuxt.config.js).
However in a very recent site the preview function only works locally - otherwise using the prod url we always get the standard Netlify 404 page ("Page Not Found ....).
I've googled the issue and saw some references to old versions of node_modules/@nuxt/schema/node_modules/ufo not working. The older site where previews work the ufo version is 0.8.5 and the newer site where previews do not work is 1.1.1. I'm wondering if it's safe to downgrade node_modules/@nuxt/schema/node_modules/ufo?
Can the Prismic team please take a look at this issue? Thanks.
Are you uisng @nuxt/prismic to manage previews? this plugin resolves all the preview setup you need in your project, aftet that you only need to setup the correct preview route in your repository's settings.
Yes I am using @nuxt/prismic to manage previews exactly as described in your link. Is there any information I can give you to help resolve this? I even tried adding the preview property in nuxt.config.js `preview: '/preview' and also added the custom preview page. Same 404 error after adding these.
fallback: true and fixing my routes array in my nuxt.config.js seems to have fixed it. The routes were defined inside the prismic object but it should have been in prismic.apiOptions - not sure why the site still worked aside from the previews.