Replies: 2 comments 2 replies
-
You are looking for, https://nextjs.org/docs/app/api-reference/next-config-js/pageExtensions Actually, this page explains it better (from the Pages docs): https://nextjs.org/docs/pages/api-reference/next-config-js/pageExtensions |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hmmm, then the ask should be to consider this type of extension by default without needing the developer to add this to their next.config. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
This was originally suggested on a Reddit comment here: https://old.reddit.com/r/nextjs/comments/1doxgd8/now_that_its_been_a_long_time_since_app_routers/lafs6mr/
I thought it was good enough that I think it's worth formally suggesting here.
*.*.page.tsx
. This would allow additional organization if a developer wanted to have a router likestore.controller.page.tsx
Non-Goals
Increasing API latency
Background
It passively provides better project organization and clarity which is never a bad thing. It'll have trickle down positives like when you search through an AppRouter project, previously you may have many results with the file name that just says 'page.tsx' but you don't know which one it is referring to because you may not be able to see a file path. If you have the prefix available you can see the actual page name for the search result, e.g.
storefront.page.tsx
.Proposal
I am very new to Next.js, I just started learning more about the App Router after using the Page Router for a while and I figured this enhancement would help me and many others.
Beta Was this translation helpful? Give feedback.
All reactions