Nuxt.js is a popular JavaScript frontend framework. But people still ask, if it is production ready. I've been using the framework for the past 5 years in a wide range of different projects, from small hobby websites to big enterprise applications. Here are some of my thoughts on using Nuxt in production and what to be aware of if you decide to do so.
Is it production ready?
Absolutely!
Nuxt is already used in large web applications in all kinds of different companies across the globe. Just take a look at their show case on https://nuxt.com/showcase . Does OpenAI sound like a familiar name to you? It's homepage was build with Nuxt (last checked Nov, 2023) and probably handles hundreds of millions of requests per month.
Compared to other popular frontend frameworks it is less popular though and they do have fewer collaborators:
Framework | Github Stars | Used By | Collaborators | npm downloads |
---|---|---|---|---|
Angular | 92.1k | 3.1m | 1.812 | 3.3m |
Svelte | 78.9k | - | 648 | 1.6m |
Vue | 206k | - | 362 | 4.3m |
Nuxt | 48.6k | 285k | 594 | 611k |
React | 216k | 18.5m | 1.641 | 22.6m |
Next | 115k | 2m | 2.995 | 5.2m |
Table: Stats from npm and Github accessed 23.11.2023
There is no big company behind Nuxt, like it is the case with Google and Angular, Facebook and React or Vercel and Next.
Nuxt has some decent backers though and at the end of the day what matters is, that they address issues and vulnerabilities quickly and that seems to be the case. New versions get released around every other week.
What does Nuxt do well?
Nuxt has a strong focus on developer experience. They enable you to move pretty fast and once you get familiar with some core concepts you can focus the bulk of your time on your code logic.
Their pre selected tech stack comes with some pretty neat features out of the box, that enable you to create fast, SEO optimized and beautiful applications.
Features include:
- TypeScript support out of the box
- SEO Meta tags
- Server Side rendering
- Data fetching with deduplication and caching
- File based routing
- Component and page transitions
- State management
- Fast build tooling with Vite
- Server functions
- and many more...
Large code bases are absolutely possible with Nuxt and the frameworks seems to hold up against big amounts of traffic quite well.
What are the downsides?
Nuxt has a very opinionated approach. It can take some time to get familiar with everything and adopt the way they want you to organize your code.
There is lot's of "magic" happening under the hood, which sometimes makes debugging quite hard, especially if you are new to the framework. You will stumble into situations and ask yourself, why is that happening/ not working??
On top, while this "magic" can accelerate things, I've found that it mostly covers simple use cases. Once you get outside a simple use case you need to put some thinking effort into fitting your problem into Nuxt concepts without using antipatterns.
Nuxt has a big eco system of tools around it. However, most of these Nuxt modules feel like half baked solutions at the current time. It seems like Nuxt just released too many things at once and can not keep up with it all. When it comes to third party libraries, I'd rather use native JavaScript or Vue libraries instead, that can usually also work with Nuxt with minimal effort.
Summary
Can you use Nuxt in production? Absolutely. It has already been used by some large companies for years and has an active community around it.
Nuxt enables you to move pretty fast, once you are familiar with some core concepts of how Nuxt works. It comes with some neat features that help you to build fast, SEO optimized and beautiful web applications.
The framework is very opinionated though and comes with a learning curve to it. There are a lot of hidden functionalities that can interfere with your code and can be hard to debug. On top, big parts of the ecosystem around Nuxt do not seem to be mature enough yet, to be used in serious production applications but you can always opt for the underlying native JavaScript or Vue library.
What are your thoughts?
Additional notes
If you need support for your Nuxt or Vue project, feel free to reach out to me via https://nuxt.wimadev.de
Top comments (8)
I'd still love to see some real world performance data. Enterprise sites with high load and what they are able to achieve with Nuxt e.g RPS, minimal hardware sizing. Would really help to understand whether for med-large scale sites whether a lighter framework would reap big or small rewards vs effort and the "magic" as you put it
Drawing meaningful conclusions from RPS to your framework performance is pretty much impossible I guess, since you can't isolate the effect of your framework. Nuxt, as well as other heavier frameworks are doing a lot nowadays to strip everything you don't actually use. I think frontend framework performance is very rarely a bottleneck and the real benefits of using lightweight frameworks are in ease of use, small bundle sizes, faster dev feedback loops, fewer vulnerabilities ...
I agree in general, "performance metrics" for the sake of it are kinda useless. Just would be nice to hear about the success stories and amount of traffic some nuxt sites are getting to help ease the concern about how well it handles traffic especially with a dynamic backend not just static site.
The biggest site using Nuxt is probably OpenAI which is listed in Nuxt's showcases. I guess we are talking about hundreds of millions or maybe even over a billion hits per month here 🤠
I wonder if its the main site though or something smaller/internal. I've seen plenty of case studies/icons that indicate a company use something. Amazing stuff though if it is.
Yeah that's true, sometimes these icons can be misleading... in this case Nuxt was used for the main homepage of OpenAI and looks like Next was used to create the interface for the chat.
I agree with your finding :)
nuxt js is good