Layouts Preview does not work when building in full static mode
See original GitHub issueVersions
- nuxt: 2.15.7
- @nuxtjs/prismic: 1.3.2
- node: 16.10.0
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 configResult
Dev app with a beta footer : ✅ works before static build
Screenshots
#### Prismic configResult
Built app with a beta footer : ❌ does not work after static build https://prismic.link/3cLCwud
Screenshots
#### Prismic configResult
Steps to reproduce
- Clone the repository
- Install deps
npm install
- Change the
PRISMIC_APIS_HREF
value innuxt.config.js
to one you created (*see next section “Prismic config”) - Launch the project with
npm run dev
- Activate Prismic preview mode on the local env for the
main_footer
- See that it is really previewed on the footer layout element
- Stop the dev server
- Build the project using
npm run build
- Launch the statically build project server locally
npm run start
- 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 aURI
uid field and bothbanner_title
+banner_content
RTE fields - Custom Type -
main_footer
with afooter_for
select field (withpix-site
default value) and atext
RTE paragraph field - A published
fr-fr
Slices page with the URIindex-pix-site
with a running modification (ready to be previewed) - A published
fr-fr
Main footer with thefooter_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:
- Created 2 years ago
- Reactions:3
- Comments:6
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.Definitely ☺️ This is still a valid “bug”