Skip to content

Commit

Permalink
docs: Add note on root layout for output: export (#1595)
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Dec 6, 2024
1 parent a08bf13 commit f1fa834
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/pages/docs/routing/middleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,14 @@ export default function RootPage() {
}
```

Additionally, Next.js will ask for a root layout for `app/page.tsx`, even if it's just passing `children` through:

```tsx filename="app/layout.tsx"
export default function RootLayout({children}) {
return children;
}
```

## Troubleshooting

### "The middleware doesn't run for a particular page." [#middleware-not-running]
Expand Down

0 comments on commit f1fa834

Please sign in to comment.