DEV Community

Andrea Stagi
Andrea Stagi

Posted on • Updated on

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.

Top comments (0)