Home  >  Q&A  >  body text

Is it possible to use both /app and /pages folders in a Next 13 application?

<p>The full details are, I'm working on a project that uses the /app folder as its main routing container, but due to some memory leak issues described on the Next.js repository, we are experiencing Here comes the performance issue. I'm wondering if it's possible to build a new part of the project in the /pages folder (without conflicting with existing routing of course), or even use TypeScript since the existing project is built in JavaScript. </p>
P粉129731808P粉129731808395 days ago640

reply all(1)I'll reply

  • P粉392861047

    P粉3928610472023-08-26 10:48:58

    According to NextJs documentation, you can use both /app and /pages folders.

    However, /app is an updated version of the /pages folder, which is the default folder in Next JS 13. In their documentation they describe the following:

    This leads us to understand that at this time the /pages folder is supported as a way to migrate to the new /app folder. Additionally, they mentioned:

    I guess technically you can use both at the same time, but I don't think you should.

    You can visit this page for more information: Routing Fundamentals

    reply
    0
  • Cancelreply