Page will not prerendered without static link to it
Environment
- Operating System:
Linux - Node Version:
v16.14.2 - Nuxt Version:
3.0.0-rc.9 - Nitro Version:
0.5.1 - Package Manager:
[email protected] - Builder:
vite - User Config:
modules - Runtime Modules:
@nuxt/[email protected] - Build Modules:
-
Reproduction
https://stackblitz.com/edit/github-jdzmbl-wb6gqy?file=pages%2F[...query].vue
Describe the bug
In demo you can find navigation. There is /arts link. This "link" is not actual a semantic link, because some component library like element-plus make navigation without semantic links.
If you try navigate to /arts after generation you will got 404.
Additional context
No response
Logs
No response
This is related to Nuxt's pre-render crawler. The $router links are not detected during page crawl.
/cc @danielroe @pi0
I'm not quite sure we'd want to support this usage. We do however support auto-discovery of additional routes via adding them via the x-nitro-prerender header, and might consider adding a tree-shakeable composable to nuxt core to allow this to be easier. wdyt @pi0?