Preview: false stops showing latest data for some reason

I'm using Prismic with Nuxt.js, and I want to get rid of the purple button that shows up on the bottom of my page during development.

prismic

I read in this Github thread that setting preview: false on my nuxt.config.js file would remove this button. So last night I updated my config to

  prismic: {
    endpoint: 'https://xxx.yyy.zzz',
    modern: true,
    preview: false
  },

The purple button disappeared (yay!), but my data froze at this point, no longer showing the latest updates I publish. When I look at my API response JSON file, it says last_publication_date"2021-12-08T23:05:40+0000", which was yesterday, right before I disabled the preview button. Removing preview: false once again fetches the latest data as expected.

Is this a known bug, or expected behavior? How can I remove that button while still getting my latest published data?

Hello @marco2

Thanks for reaching out to us.

preview: false usually disable previews and toolbar on your website. The module won't inject Prismic preview script anymore, and the /preview page won't be registered. It should work.

Are you looking for an API response on your website or your API browser? If your changes appear correctly in the browser but not on the website, then this article covers the most common reasons for this.

Can you also try to remove modern set to true in the nuxt.config.js file?

modern: true

This has been known to cause issues:

Nuxt Generate won't create repeatable type pages Nuxt.js

Give this a try and let me know.

Thanks,
Priyanka

1 Like