Skip to content

Add dynamic routes to your nitro config prerender object

Notifications You must be signed in to change notification settings

GustavoLC901010/nuxt-prerender-routes

 
 

Repository files navigation

Nuxt prerender routes

npm version npm downloads License Nuxt

Features

  • Prerender dynamic routes fetched from your api

Quick Setup

Install the module to your Nuxt application with one command:

npx nuxi module add nuxt-prerender-routes

That's it! You can now use nuxt-prerender-routes in your Nuxt app ✨

Add nuxt-prerender-routes to your nuxt.config modules setup

  modules: [
    'nuxt-prerender-routes'
  ]

Add prerenderRoutes object with prerender option enabled and your's api url to fetch your routes. You can also define a route prefix (optional) with 'routePrefix' option

  prerenderRoutes: {
    prerender: true,
    apiUrl: https://yours-api/url,
    routePrefix: ''
  }

Contribution

Local development
# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release

About

Add dynamic routes to your nitro config prerender object

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.2%
  • JavaScript 11.3%
  • Vue 2.5%