Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

411
Views
Next.js doesn't use _app.tsx and _document.tsx in src/pages folder

The Next.js documentation states, that the directory src/pages is an alternative to /pages. However, my custom _app.tsx and _document.tsx files, get ignored when the pages folder is moved into src.

You can recreate this issue yourself, when creating an empty Next.js App, moving the pages folder into src and updating the import paths of the css files. The content of the index.tsx file will still be rendered, but modifications to the styles/globals.css, which is imported in the _app.tsx will have no effect.

It is impossible to have a pages folder inside of src and outside of src at the same time, therefore preventing me to use src/pages in any app which needs a modificaton to the _app.tsx or _document.tsx.

Am I missing an important part of the documentation or does this work as intended?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!