question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Layouts Preview does not work when building in full static mode

See original GitHub issue

Versions

Reproduction

Reproduction repository : https://github.com/yannbertrand/prismic-nuxt-preview-test

Built app with a beta header : ✅ works after static build https://prismic.link/3cLAI4o

Screenshots Prismic config

Result


Dev app with a beta footer : ✅ works before static build

Screenshots #### Prismic config

Result


Built app with a beta footer : ❌ does not work after static build https://prismic.link/3cLCwud

Screenshots #### Prismic config

Result

Steps to reproduce

  1. Clone the repository
  2. Install deps npm install
  3. Change the PRISMIC_APIS_HREF value in nuxt.config.js to one you created (*see next section “Prismic config”)
  4. Launch the project with npm run dev
  5. Activate Prismic preview mode on the local env for the main_footer
  6. See that it is really previewed on the footer layout element
  7. Stop the dev server
  8. Build the project using npm run build
  9. Launch the statically build project server locally npm run start
  10. See that the preview does not work on the footer layout element

Prismic config

Here is the Prismic setup I used (but you should be able to tweak it and reproduce the issue):

  • Custom Type - slices_page with a URI uid field and both banner_title + banner_content RTE fields
  • Custom Type - main_footer with a footer_forselect field (with pix-site default value) and a text RTE paragraph field
  • A published fr-fr Slices page with the URI index-pix-site with a running modification (ready to be previewed)
  • A published fr-fr Main footer with the footer_for=pix-site with a running modification (ready to be previewed)

What is Expected?

Preview mode should work the same way in Developpement+SSR+Static and after Full Static build.

What is actually happening?

Preview mode works the same way on page elements, but not on layout instantiated component.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

1reaction
lihbrcommented, Mar 16, 2022

Sadly the PR fixing this one on Nuxt end (https://github.com/nuxt/nuxt.js/pull/9530) won’t land as Nuxt team shifts its effort toward Nuxt 3.

I’m closing it with a wontfix flag and will update it should the PR change its status.

1reaction
lihbrcommented, Nov 30, 2021

Definitely ☺️ This is still a valid “bug”

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to preview your layout in light and dark mode
Tip: If your preview is zoomed right in, you should either scroll around or zoom out to the other previews. Hacking with Swift...
Read more >
Advanced Features: Preview Mode
js has a feature called Preview Mode which solves this problem. Here are instructions on how to use it. Step 1. Create and...
Read more >
Report layout and presentation | Visualize and present data
Each historical run has a unique static report run URL so that specific run can be shared with others. IMPORTANT: Mode only stores...
Read more >
How to Fix Divi - A Complete Guide To Solve Issues and ...
Go to Divi>Theme Options>Builder>Static CSS File Generation and select the “Clear” button. Pro Tip: It is best to keep this setting disabled ...
Read more >
Present designs and prototypes
Use presentation view to preview static designs, or interact with prototype connections you've created. Your design must be within a frame to preview...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found