vue.jsnuxt.jsstatic-site-generationnuxtjs2

Nuxt 2 - SSG - Embed data in HTML


I saw that Nuxt 2 stores data in json files called payload.js in SSG mode.

Instead to store these data in json files, is it possible to store the data directly in HTML files, after the generation ?

Thanks

All payloads.js files


Solution

  • After an offline discussion, I've concluded that OP's main issue was more of a heavy image usage (≈40MB of .png) + other basics Web Core Vitals to get fixed rather than some prefetched pages set by Nuxt.

    enter image description here

    I've also provided the following links to improve the overall performance of their SSG app:

    The goal being to do 20% of the heavy work for 80% of no-comprise better metrics. The rest being more advanced/subject to internal discussions as of how to proceed regarding the respective drawbacks.