Appreciate the time taken to reply and provide insight.
Thanks, I'm not using nuxt because we don't need or require SSR (i.e a node server to host). Instead we host on a static web server like aws s3, which scales far better. Vue creates a single page application which can be hosted on s3 or any static host, without any other software, same like React or Angular.
But since its a SPA all 'content' will need to be fetched at run time from prismic hence my dilemma. Users have to wait for content to be loaded as opposed to it being there already when i had it without prismic , (content was previously hard coded in the html files)
We also dont need the other features provided by Nuxt, gatsby, gridsome etc. All we need is for the files to built statically. I am sure i cant be the only person with this use case.
Yes vue does not provide any tooling for pre-rendering (apart from some out of date 3pl) because they are focused on being a single-page application, and they try to force you on to Nuxt when actually you probably don't really need a framework on top of the framework, but you just need to pre-render certain routes on build time.. Hope I am making sense.
I cant use sveltekit because our app has been built with vue already.
I will check out your other options.
Another final way is to use a headless chrome puppeteer and manually integrate it with webpack build to built out the routes..
This is what Im looking for:
- 'npm run build'
- webpack build files as normal
- build will detect that certain routes require to be pre-rendered or being made static for example /about /index /contact
- fetch all apis, await for data (i.e prismic routes)
- create .html files for each of those files
- save files in /dist folder
- do the rest of the things that webpack does.
once again i realize that prismic is a headless cms, and was only hoping that you have come across users who need content to be built at build time injected in to the html and served on a static host.
Thanks so much again.