Skip to content
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

Next.js 12 doesn't run _app/index.page.tsx #31868

Closed
denkigai opened this issue Nov 27, 2021 · 6 comments
Closed

Next.js 12 doesn't run _app/index.page.tsx #31868

denkigai opened this issue Nov 27, 2021 · 6 comments
Assignees
Labels
bug Issue was opened via the bug report template.

Comments

@denkigai
Copy link

denkigai commented Nov 27, 2021

What version of Next.js are you using?

12.0.4

What version of Node.js are you using?

16.7.0

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying your application?

local

Describe the Bug

When I set index.page.tsx under _app directory, Next.js 12 doesn't run it.
Previous version of Next.js works with this properly. Is this directory structure not recommended?

Expected Behavior

_app/index.page.tsx

To Reproduce

Move _app.tsx into _app directory and rename it as index.page.tsx with custom page extension setting.

@denkigai denkigai added the bug Issue was opened via the bug report template. label Nov 27, 2021
@denkigai
Copy link
Author

I found that _document/index.page.tsx also doesn't work.

@hellolovebuxiu
Copy link

I had same issue

@thibautsabot
Copy link
Contributor

thibautsabot commented Nov 28, 2021

Hey!

I tried to bisect to see when the issue started occurring and it seems that it was introduced by v11.1.1-canary.12.

By looking at the release notes, the most logical candidate would be this PR: #28279.

@balazsorban44
Copy link
Member

balazsorban44 commented Dec 1, 2021

I am just curious, what's gain here over simply having a _app.tsx and/or _document.tsx file?

If it's this: https://nextjs.org/docs/api-reference/next.config.js/custom-page-extensions

I would also try _app.page.tsx and _document.page.tsx also.

I don't see having these as folders are documented.

@balazsorban44 balazsorban44 self-assigned this Dec 1, 2021
@balazsorban44
Copy link
Member

The documentation actually does not mention using those files in that format (It does mention _app.page.tsx and _document.page.tsx, so these are fine), so it was never actually intended to define these files in folders.

@balazsorban44
Copy link
Member

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.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

4 participants