1

Using project with Next.JS 9.1.2 with default server and file system routing.

I am wondering if it is possible to customize the file system routing to ignore certain paths.

Specifically, I want my directory structure under /pages/import to have a partials subdirectory, where I can break up the main import page into smaller sections. I want to do this for most of my other pages as well. However, adding the partials directory creates routes for all of the pages contained within partials, which is not my intent.

I can use rewrite, or redirect to make the user see the main page instead of one of the partials, but the routes are still being generated at build time and I'd like to avoid that.

Is there anyway to customize the file system routing to ignore certain paths?

I would like a solution that does NOT require running a customer server.js.

jjspierx
  • 310
  • 3
  • 15

0 Answers0