-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to rename 'pages' directory #5303
Comments
Note, this is a separate question from the one that is posted over and over about changing the path of pages to be under src or something of the sort, this is specifically about renaming the directory in config. |
The interesting part of this is that you could already achieve this without renaming or changing anything in Next.js, by just inverting the structure you want:
We're not planning to make |
Posted #8451 |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Feature request
I would love the ability to rename the pages directory, for my case I would like to call it "routes." This would then allow me to use the "route" components (currently pages) as basic wrappers that would essentially just reference a different component. The reason I want this is since Next currently has no intention of supporting the glob pattern under pages I would like to be able to write unit tests and css for my wrapper components.
routes/
-- about.jsx
pages/
-- about/
---- about.jsx
---- about.spec.jsx
---- about.scss
The above structure is what I'm hoping to achieve, of course I could just name "pages" something different like "containers" but I feel as if that could be confusing to future developers on this project. Being able to rename "pages" to "routes" would then free up the name "pages" to use instead of "containers" (frequently used to describe class based components).
Is this something that is possible in Next today? Maybe something that could be implemented?
Thanks for any help!
The text was updated successfully, but these errors were encountered: