4 ms·
Nuxt is more than sufficient as a static site generator. It’s better to use SSR if you have dynamic pages with changing content, which requires a server. But Nu
by dmix 7y ago
Nuxt is more than sufficient as a static site generator. It’s better to use SSR if you have dynamic pages with changing content, which requires a server. But Nuxt has the option to generate the pages statically (using Vue component templates to create static HTML pages).
It’s my favourite development in web development in a long time.
https://nuxtjs.org/ https://nuxtjs.org/
I’m starting to feel like I want to use JS now for sites instead of just being forced to because of its power on the frontend. I hope the future is top heavy component based SSR with an API style backend which also runs off your web server.
With much simpler API requirements it’s easier to use languages like Rust and Haskell since the whole templating, view helpers, routing, layouts, asset management, and rendering stuff is all handled for you by the SSR app. Then you focus the backend on models, logic, authentication, and databases.
- praveenweb 7y agoI would recommend pre-building html markup as much as possible for performance boost and hydrate on the client for dynamic content, instead of going the SSR route. Obviously this may not be applicable for all use cases though. Shameless plug: I just wrote a guide to approach dynamic content on static sites a few days ago. https://blog.hasura.io/approaches-to-add-dynamic-content-statically-generated-sites-jamstack/ https://blog.hasura.io/approaches-to-add-dynamic-content-sta...
- mattacular 7y agoCan you elaborate on your recommendation not to go SSR? Seems there are pretty well understood pros and cons to full SSR vs. static prerendered pages. The "right" choice depends on your app.
- siquick 7y agoAlso a big fan of Nuxt. The way it takes care of potentially tricky tasks like SSR and code splitting is a joy. The only thing I've had difficulties with is getting the Lighthouse speed rating above 50.
- lgl 7y agoI've recently developed a website using nuxt and got 100 lightspeed for both mobile and desktop (as long as I'm not using any kind of throttling as that will penalize the performance category). Admittedly it was more of a personal goal but it's definitely possible and I'm pretty sure nuxt isn't the reason for you not getting it over 50. Ironically, the only pages where I can't get a 100 score is when I'm using google maps due to a "Does not use passive listeners to improve scrolling performance" rule.
- aliveupstairs 7y agomaybe your testing on your dev environment, because I just scored a solid 98 using nuxt.
- newsbinator 7y agoMy stack of choice is Nuxt + Pug templating + Sass. It makes my life a lot easier.
- nkingsy 7y agoVue+Pug is a nice combo. If you're going with custom template syntax, may as well go all the way.
- tnolet 7y agoI found Nuxt absolutely terrible to work with when I tried it about 1.5 years ago. Bad documentation, confusing terms and architecture. I ditched it. Has it become any better? I'm pretty comfortable with Vue.js.
- no1youknowz 7y agoProbably not. A few weeks ago, I went from zero to building something with it. The documentation is certainly not as good as Vue. Which is a shame. I wish someone from their team talked to the documentation master over at Vue and made their documentation as good. The only other criticism that I have, is that with Vue there are a lot of people over at discord. So if you can get stuck, you'll get some help. For Nuxt, you'll just get flat out ignored. Especially if you are developing on a Node JS framework no one is using. I really wish there was more competition in this space. Happy Gridsome is stepping up and hopefully will be better in aspects compared to Nuxt. That said, in a few weeks. Will build something with Gridsome and then I can have a better opinion.
- nkingsy 7y agoVue's documentation is a work of art, backed by a clear philosophy about the underlying software. If a consultation with them was all it took to produce docs that compelling, they probably should go into the consulting business so we can all have perfect docs.
- fbnlsr 7y agoLaravel's documentation is also great to read. It's well done, concise enough and presented in a pleasant manner.
- nwsm 7y agoI haven't used Nuxt but I just recently read some complaints about it basically eating errors and making debugging a nightmare.
- 7y ago