SSG1 [Next.js] Next.js 자주 사용하는 기초 문법 15가지 명령어 (yarn) 설치 자바스크립트로 설치 yarn create next-app 타입스크립트로 설치 yarn create next-app --typescript 개발환경 실행 yarn run dev 배포 파일 생성 → build된 파일은 .next 폴더 안에 위치 yarn run build Production Mode로 실행 build한 프로젝트 실행 yarn start 문법 1. 기본 폴더 구성 .next: 빌드된 파일이 .next 폴더 안으로 들어간다 node_modules pages: pages 폴더 안에 있는 파일은 자동으로 라우팅이 되서 url로 접근이 가능하다 _app.js index.js public styles: css module 방식을 기본적으로 사용 global.css Home.mo.. 2022. 9. 14. 이전 1 다음