Router Extras Module screenshot

Router Extras Module

Author Avatar Theme by Nuxt community
Updated: 11 Sep 2023
279 Stars

Extra Add-ons For Nuxt 2 Router

Categories

Overview

The @nuxtjs/router-extras module is a Nuxt.js add-on that provides extra features for the Nuxt 2 router. It allows users to define custom paths for a page, create multiple aliases for a single page, and define multiple parameters regardless of the page’s directory structure.

Features

  • Define custom paths for a page
  • Define multiple aliases for a single page
  • Define multiple params regardless of pages directory structure

Installation

To install the @nuxtjs/router-extras module, follow these steps:

  1. Add the @nuxtjs/router-extras dependency to your project.
  2. Add “@nuxtjs/router-extras” to the buildModules section of your nuxt.config.js file (Note: If you are using Nuxt < 2.9.0, use “modules” instead).
// nuxt.config.js
{
  buildModules: [
    '@nuxtjs/router-extras'
  ]
}

Summary

The @nuxtjs/router-extras module provides extra features for the Nuxt 2 router, allowing users to define custom paths, create multiple aliases, and define multiple parameters for their pages. It simplifies the configuration process and enhances the flexibility of the Nuxt.js router.