I am new to Nuxt. I have made one static site that turned out great but now making a site with dynamic content (like a blog). I would have a structure like so:
->posts/
-->index.vue
-->_slug.vue
When running npm run dev
I can go to mysite.test/posts/slug-1
and I get the page I want. If I refresh I still get that page I want.
The issue comes when I build it. I use npm run build --spa
(not generate, I know generate creates static files and I would have to make a static file for each post). Now if I go to mysite.test/posts/
and click on a post, it navigates to mysite.test/posts/slug-1
and it works. If I go to the URL directly or refresh, it does not?
The site clearly says SPA mode works with dynamic routes, but it from what I see it only works to navigate to them, not direct link?