Building a plain SPA with Nuxt!?

preview_player
Показать описание
🗝️ Single Page Applications are amazing! Sometimes you simply don't need SSR at all, especially when building behind authentication. While you can use plain Vue to build a fully client-side rendered application, Nuxt is also capable of building good old SPAs (unlike other meta frameworks 👀). In this video, you'll learn how it works, what you can set up and why you should use Nuxt for it!

---
Key points

💡 Setting up Nuxt to render an SPA
🤔 Find out *why* you should use Nuxt to build plain old SPAs
🫳🏻 Optionally avoid rendering for all static HTML files

---
Links

Don't forget to hit that "Subscribe" button, ring the notification bell and give a thumbs up!

🌐 Connect further:

---
Chapters

00:00 Intro + Setup
01:04 Demo Application
01:47 Running nuxt generate
02:32 Disabling SSR
04:56 Clear all routes to prerender
06:25 Is it an SPA now?
06:42 Hash mode for the router
08:39 Why should you build a plain old SPA with Nuxt?
10:49 Wrapping up!
Рекомендации по теме
Комментарии
Автор

You always surprise us with amazing new content, Alex! Haha!

gabrielserejo
Автор

Always wondered how to build a SPA with Nuxt, thanks for sharing!

xuanmo-xt
Автор

finally something valuable in SPA, learned something new for capacitor js application will try

AksoomHussain
Автор

Bro on next friday you have to make a full detailed video on different rendering modes and how they works and how we can utilize them through routeRules

waleedtariq
Автор

Yes! It's friday... sure the weekend is almost there, but also another great video from Alex! ⭐

DavidDeSloovere
Автор

Great video, exactly what I've been looking for.

I've been trying to make an embeddable SPA and I need to turn of all SSR, and everything else, but I also need to output all of the js and css to a single file with a predictable name that won't change on every build. is that possible?

kkalvaa
Автор

I’ve kind of understood. I’m still struggling whether to use ssr or not for an admin dashboard. I don’t know when to use it. I have a separate backend, so that’s the only reason I’d say I’d turn ssr off

vfxjorge
Автор

hello alex, thank you for the awesome video, i have an app with nuxt that i want to turn into an SPA, since it's all behind auth i dont really need SSR.
my only issue now is that i have server routes but with this setup the nuxt build is not building the api nitro server at all,
any ideas how to resolve that ?

RiadDZz
Автор

Okay, this is clear enough.
Now, can you teach us on a situation you mentioned:
At some point we would like to have some SSR content (pages).
Can we use this setup and how, ideally add why an when we should consider that (some examples).
Subliming to 10-20 minutes, like in this video would be just awesome!

I would like to maybe abandon GatsbyJS and you might be a good reason why should I consider NuxtJS. :)
Best regards!

deliriumcode
Автор

i really love ur content and as a nuxt.js developer always watching it, thank u for creating these videos ❤

shakur_t
Автор

Thanks Alexander for the great video, i have a question, currently i have SPA app on Nuxt3 configured as you explained in the video.

I want to deploy my App on Azure Static Web Apps, should i use "pnpm run build" or "pnpm run generate" command?

From what i understand, i should use "pnpm run generate" then use the index.html as the entry file, but is this will still keep my SPA and i also have fetch requests on my app based on click events, would those be effected?

ZayedAlRaeesi-vyub
Автор

As always great content! Thank you, Alex ♥
Though I have a question regarding routes lazy loading in Nuxt. Away from the 'lazy' prefix for components, what about routes? I know that by default Nuxt configure all pages to lazy load, but where can I read more on that and how to have more control over that behavior, like lazy load/ prefetch only specific pages, etc.

alimaher
Автор

Great content as always! I wonder if there is a way to build and have css and javascript files inline inside index.html

MarcinFeszter-mr
Автор

Where can I get that beanie you're wearing in the title card?

theProzacGeneration
Автор

Cool, can we do a mobile app similar way?

DanielLuchin
Автор

ssr: "nope!" should be a thing

Muphet
Автор

Feedback: Add a music as background :) … nice stuff man, keep posting it please

oiluis