App directory prefix for common files such as page.js or layout.js #49645
Replies: 7 comments 1 reply
-
You know, I was also somewhat concerned about this, but I learned to just search, for instance, That being said, I do like this, because it is able to built in meaning into the page name. I guess this has been discussed before though, there was a lot of fuzz when the For prior art, we have the pages dir feature called Custom Page Extensions: https://nextjs.org/docs/pages/api-reference/next-config-js/pageExtensions nvim: vscode: |
Beta Was this translation helpful? Give feedback.
-
I'm also, somewhat thinking that this is in part a VSCode problem. One can configure the tab title label to short mode, which includes the parent directory name. Why isn't this the default, beats me, but it sure helps a lot in several projects. Not only in Next.js. |
Beta Was this translation helpful? Give feedback.
-
My eyes are over saturated with page.tsx, please strongly consider this proposal. |
Beta Was this translation helpful? Give feedback.
-
imagine browsing chrome and every tab says page, that's the next.js app router experience. |
Beta Was this translation helpful? Give feedback.
-
This is a good idea! We had this feature with the pages router before next13, and the documentation is not explicit that the feature was deliberately removed in the app router, so at very least I think this should be documented as a change in the latest release. I don't see any reason this feature couldn't co-exist with the app router though. |
Beta Was this translation helpful? Give feedback.
-
Agree we need a way to differentiate at glance the file we are working on. Having just page.js is awful |
Beta Was this translation helpful? Give feedback.
-
my first impression using next is page.tsx all over the tab in my vscode, hahaha. please consider this proposal |
Beta Was this translation helpful? Give feedback.
-
Goals
Search-ability of common files in app directory.
Non-Goals
No response
Background
The new app structure makes it harder to find things in your project when you have 20 files all named page.js, layout.js, etc.
Proposal
It would be great if we could name/prefix these files, like:
and still have them picked up by the router system.
Beta Was this translation helpful? Give feedback.
All reactions