1

Pps with Nuxt experience, please help: Nuxt has a config option "ssr" that can be set to false: https://nuxtjs.org/docs/...

My question is: what is the point of using Nuxt if you set ssr to false, considering that I would use a lighter solution for static sites, or just Vue for an SPA?

Comments
  • 0
    This is so you can use a fully made 'vuejs' website as a static website.

    So one that you can host on any apache or whatever you like server.

    You can also make it singlepage.

    If you have ssr on, you need a host that supports node.js

    I made a website like this in Nuxt. I love it.

    But recently, I found Astro.build. It does the same as Nuxt, but the difference is that astro will try to add as less JS as possible.
  • 0
    @Grumm ok I get it but I don't get it, why would you use an SPA framework to create a non-SPA website? I suppose that's what's in vogue today? Why not simply Jekyll/Hugo/metalsmith?

    It makes absolutely no sense to me to require developers/maintainers of a static website to be familiar with a SPA framework, or even JS.Typically I'd want content for a static website to be easily editable by less technical people (eg webmasters, designers) and have the contents in YAML/JSON, markdown, HTML and (S)CSS.
  • 0
    @webketje if SPA == just a bunch of text, yes. But most SPAs are whole apps these days.
  • 0
    @nitwhiz what is "whole apps"? server & client? (In that sense "whole apps" can be easily done using a decoupled API and an SPA, optionally on a SSG layer)
    I would really like to get a convincing reply on what I'm missing that I don't see the utility of nuxt as an SSG (without SSR) except for framework familiarity
  • 1
    @webketje it's just that, framework familiarity imo.

    Doesn't nuxt have tools for easy bootstrapping/scaffolding? Maybe that, too.
  • 1
    @webketje For a non SSR, you are correct.

    But remember that all functionality of nuxt is available. so you have localisation (using the nuxt-i18n package), dynamic nested routings. You can create a full single-page website with no backend and just getting data from an API.

    You don't need a node.js server to run it.

    You can develop in vuejs, using all the bells and whistles.

    Also SEO is easier to manage in Nuxt.

    The code and files are easier to maintain. Layout is easier. You have scoped css so no need to have a huge css file.

    But again, if you don't need all of that, or you want to do most of the stuff manually. You can use plain html+css+js.
  • 0
    @Grumm thx for taking the time to write this up. I conclude that framework familiarity + "bootstrapping quality" (glueing i18n, SEO, SPA, CLI service, and other bells and whistles).
    I end with a little disclaimer: I maintain https://metalsmith.io and believe being able to easily glue tooling together trumps having the setup pre-glued for you. The latter gets you started faster, but the former is easier to maintain
  • 0
    @webketje Looks nice.

    Most of the time, it is just preference.

    What would you pick if you already know how vuejs works and you already have made server side websites ?

    Sometimes, it is best to stick with what you know instead of learning a complete new framework.
Add Comment