vercel / next.js

The React Framework
https://nextjs.org
MIT License
122.59k stars 26.23k forks source link

Even when using only the app router, pages files are generated. #67214

Open yongholeeme opened 2 days ago

yongholeeme commented 2 days ago

Link to the code that reproduces this issue

https://github.com/yongholeeme/reproduction-pages-file

To Reproduce

  1. $ npx create-next-app@latest
  2. $ pnpm run build
  3. .next/server/pages/404.html, .next/server/pages/500.html exists

Current vs. Expected behavior

I think there is no page router file. I'm curious why the build output includes pages like 404.html and 500.html.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:19:05 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8112
  Available memory (MB): 24576
  Available CPU cores: 8
Binaries:
  Node: 20.13.1
  npm: 10.5.2
  Yarn: N/A
  pnpm: 9.1.1
Relevant Packages:
  next: 14.2.4 // Latest available version is detected (14.2.4).
  eslint-config-next: 14.2.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Output (export/standalone), Pages Router

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

I'm curious why _app is generated in the pages.