Currently, we are in the process of developing a Nuxt application using npm run generate
and deploying it as a Static Site Generator (SSG). However, an issue has arisen where the application is being built as a Client-Side Rendered (CSR) app instead of Server-Side Rendered (SSR). Upon inspecting the page source, we only observe
<div id="__nuxt"><div class="document-driven-page"><!----></div></div>
within the body tag, without any scripts.
You can view the deployed site here:
The root cause of this problem might be associated with the v-if="isPageReady" condition in default.vue. Unconditionally removing this condition leads to another issue outlined here.
Your script code goes here...
We aim to convert the application to SSR mode and determine a method to avoid displaying the incompletely constructed HTML. Any suggestions or assistance on this matter would be highly valued.
For reference, you can access the Reproduction Repository at: https://github.com/newyee/nuxt-site