- Prerender dynamic routes fetched from your api
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: ''
}
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