#How to pull in Data from external Api when using yarn generate

2 messages · Page 1 of 1 (latest)

pale knoll
#

I have a folder "news" with a file called ...slug.vue and at the top of the file I pull in data via const route = useRoute() const {data: data, pending, error, refresh} = await useFetch("http://192.168.10.11:8055/items/Blog/?filter[title][_eq]=" + route.params.slug[0]), in my nuxt.config.ts I have this generate: { routes: ['/news/news-2/', '/news/news-1/'] },, after deploying it still calls the api-route, how do I avoid that?

#

I want the data to be pulled in when I use yarn generate