Next.js · Junior · Question 74 of 75
How do you serve the whole app under /docs (e.g. acme.com/docs)?
- ✓Correct answer: Set
basePath: '/docs'innext.config.ts - 2Move all pages into
app/docs/and nothing else - 3Use
assetPrefixonly
Explanation
basePath is applied automatically to <Link> and router.push. It's set at build time and can't change without rebuilding.