Reputation: 82
To generate a static site using NuxtJS, it seems there are 2 options to set: ssr:false
and target:static
inside the NuxtJS config file (nuxt.config.js
) which practically do the sme thing? Why both of them exist if they do the same thing? or is there any difference between the two options.
Upvotes: 0
Views: 934
Reputation: 46602
ssr: false
is used if you want to have only an SPA.
On the other hand, target: 'static'
is used if you want to have SSG, rather than regular SSR (with taget: 'server'
).
It means that you could have a mix of:
ssr: true
+ 'static'
aka SSGssr: true
+ 'server'
aka SSRssr: false
+ 'static'
aka SPAFeel free to make a search on Stackoverflow to have more details.
To answer the question, static can be SSG or SPA, but the second one doesn't have all the SEO benefits etc, it's pretty much a regular Vue app (and you're loosing quite some benefits of Nuxt).
Upvotes: 2