Next.js Discord

Discord Forum

How to use app router route handlers inside pages router app along with pageExtensions?

Unanswered
West African Crocodile posted this in #help-forum
Open in Discord
West African CrocodileOP
const nextConfig: NextConfig = {
  pageExtensions: ['page.tsx', 'page.ts'],
...
}


We have this config to allow co-locating files close to the source within pages/**, however when pageExtensions is enabled the app router route handlers are not found.

0 Replies