I am currently using Angular + nodejs as my main tech stack...
I am interested in Vue, had a few simple projects with that, and saw a few videos about Nuxt3.
Does Nuxt3 support SPA applications (with nodejs API), or not?
If not, will it support SPA in the future?
Can we use Nuxt as SPA only?
Asked Answered
Nuxt is a super set of Vue, meaning that it can do everything that Vue does but will add more capabilities on top of it.
As shown here, you can totally use Nuxt3 as an SPA by adding the following to the nuxt.config.js
file
defineNuxtConfig({
ssr: false
})
Still, I recommend using at least SSG or SSR to get some SEO/rendering benefits.
@Zeba
build
is for an SSR app, since SPA can be fully static you don't need a server to render it on demand. The good one to use is generate
(it will build it at build-time when pushing your code). –
Dink But the generate command will generate all pages file to html, this is more like SSG than SPA. With SPA mode, we only need 01 file
index.html
, not all route pages. –
Theorbo © 2022 - 2024 — McMap. All rights reserved.
$ npm run generate
or$ npm run build
? – Zeba