I'm setting target: "static"
to pre-generate most pages for my website.
There are some pages that are created at run-time, like if a user creates a new page in their account.
Problem: When the user creates a new page and refreshes, that static page wasn't generated, and instead it shows my homepage (default.vue).
Is there a way to have the 404 understand the route and load it client-side, as if i was using target: "server"
or SPA mode?
I've tried different combinations of:
target: 'server',
ssr: true,
generate: {
fallback: true,
},
I already have dynamic routes set up (/page/:id
) but when I load a page that was created after nuxt generate
, that generated page doesn't exist.