Is it possible to use both /app and /pages folders in a Next 13 application?
P粉129731808
P粉129731808 2023-08-25 13:00:30
0
1
715
<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粉129731808
P粉129731808

reply all(1)
P粉392861047

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template