mkdir next-project
cd next-project
yarn init -y
yarn add react react-dom next
package.json
에 추가하기
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
}
실행하기
yarn dev
pages
├── index.js
├── profile.js
└── p
└── [profile].js
components
├── Header.js
└── Layout.js