Blog post By Xyz - Published at 11/28/2022, 12:47:41 AM
First create a new NextJs 13 Project from this
npx create-next-app@latest --experimental-app
# or
yarn create next-app --experimental-app
# or
pnpm create next-app --experimental-app
To say NextJs to opt for app directory change the next.config.js like this.
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true,
},
};
module.exports = nextConfig;
.