How to fetch data only when I build the website
Hello ! π
I'm migrating to Nuxt 3 and I would like to deploy my website with Netlify.
But I would like to fetch some data and that it be built without making HTTP requests to the relevant API on the client side.
At this moment, and under Nuxt 2, he works like :
How I can recreate that under Nuxt 3 to avoid useless HTTP request on Client side ?
2 Replies
Use useFetch composable and nuxi generate
Oh, I just seen my
package.json
uses nuxt build
on Netlify. π