DEV Community

Andrea Stagi
Andrea Stagi

Posted on • Edited on

6 3

NuxtJS 2.13.0 has been released with Full Static Generation

NuxtJS 2.13.0 is finally here and comes with a great feature we've been waiting for: full static generation 🎉 Before this release, it was possible to have full static support using nuxt-payload-extractor module as you can read here.

Starting from version 2.13.0 Nuxt.js has a crawler inside to detect every relative link and generate it. You can disable the crawler setting generate.crawler: false and still add dynamic routes by your own for performance reasons or to add extra routes that the crawler could not detect.

I've just updated my article How to build a Jamstack multi-language blog with Nuxt.js with full static generation support following these steps:

  • Remove nuxt-payload-extractor and all its references in nuxt.config.js and asyncData
  • Upgrade nuxt to 2.13.0
  • Add target: 'static' to nuxt.config.js
  • Add new scripts to package.json to export and serve the static site
{
  "scripts": {
    "export": "nuxt export",
    "serve": "nuxt serve",
    ...
  }
Enter fullscreen mode Exit fullscreen mode
  • Run yarn build && yarn export instead of yarn generate

For more information about this awesome feature, please read Going Full Static from the official Nuxt.js blog.

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay