Hi there I am facing the following challenge: we have a website with 3000+ posts, which we fetch as json files from a wordpress REST API (it's not important where they come from actually...).
We have multiple problems with such an amount of posts:
Now in general. How would you tackle this problem?
App.js/loading all data So far we thought of distributing all the posts data into json-files of 10 posts each. So, for 100 posts, we get 10 json files). With this we also just built a pagination. We load the data of 10 posts into the store, when starting our app. The first page of posts displays the first 10 posts. If you proceed to the second page, we load the next 10 posts dynamically.
When creating the routes (nuxt generate) we generate the routes based on these json files. This seems to make our entry point app.js very big. So far I have a poor understanding what the app.js must be able to do, but why does it have to store all the posts data? For our purpose it would be sufficient if it stored the data for a couple of pages and (maybe) the first 10posts. All the other posts don't have to be in the app.js.
How can we exclude it from the app.js?
Build time Let's imagine we have made one small change to one of our 3000 posts. The change is just about content, not it's layout. Now we execute nuxt generate. How can we omit creating 3000 new static html files and just recreate the changed post html? Same for adding files? (We think that on a CDN service like netlify, the build time (incl. nuxt generate) will increase to an unpleasant duration, with such an amount of posts -> making the time to a visible change of the post unacceptable.
Is there a way to only partially recreate the static htmls? If yes, how? If no, what other options do we have?
<img width="808" alt="image" src="https://user-images.githubusercontent.com/7059580/35161891-daa71f0e-fd41-11e7-99bc-2a9c685d751e.png">Thank you for any help. May this be some general information what the app.js has to store and what is optional or specific hints how to approach the mentioned problems. Cheers
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2302">#c2302</a>)</em></sub></div>