How to stop nuxt generate to crawl links
Nuxt generate will look for all <a> tags and follow their href to generate them. How to stop this?
2 Replies
Hi @NightFuries. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To stop Nuxt from crawling links during the
nuxt generate
process, you can configure the nitro.prerender
options in your nuxt.config.ts
file. Here's how you can do it:
1. Set crawlLinks
to false
to disable automatic link crawling:
2. Optionally, you can specify the exact routes you want to prerender:
3. If you want to exclude specific routes from being prerendered, you can use the ignore
option:
By configuring these options, you can control which routes are prerendered and prevent Nuxt from automatically crawling all links.
For more detailed information on prerendering configuration, you can refer to the Nuxt documentation on Prerendering (https://nuxt.com/docs/getting-started/prerendering).
Nuxt documentation on Prerendering (https://nuxt.com/docs/getting-started/prerendering)
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@711113525023735809> Kapa.ai is still learning and improving, please let me know how I did by reacting below.