I am building a simple site using Nuxt, and Prismic.
All the content pulls fine and works perfect on my local machine using npm run dev. The issue occurs when I've generated the files; it seems to 404 on every second link. But, if I refresh its fine.
See this video: https://vimeo.com/381189229
Description of the video:
- Land on the homepage
- Click 'Why?' Page loads fine
- Click 'What?' Page 404's
- Refresh page loads fine.
- Click 'Services' Page loads fine.
- Click Blog, page 404s
- Refresh page loads fine.
- Rinse and repeat
I am generating the dynamic routes by querying the prismic API for pages and blog posts, then passing them into the nuxt generate command.
Here is the output from the generate command:
So it clearly is generating the pages and I can see the pages in the /dist folder.
Another pointer is that the site works fine when I disable JS.
I would link to the site, but it's under htauth.
Does anyone have any ideas? Thanks.