Configuration
basePath configuration
Mounts the application under a path prefix; client build embeds this value. Source: https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath
Formal Syntax & Structure
nextjs syntaxnextjs
basePath: '/books'Working Example
Example Snippetnextjs
import type { NextConfig } from 'next';const config: NextConfig = { basePath: '/books', trailingSlash: false };export default config;