Open dlgustn555 opened 3 years ago
npm install next react react-dom
npm install -D typescript @types/react @types/node @types/react-dom
{
....
"scripts": {
"build": "next build",
"dev": "next dev",
"start": "next start"
},
...
}
node_modules
.next
eslint --init
타입스크립트를 사용하는 넥스트BNB 프로젝트에 필요한 라이브러리 설치
package.json 에scripts 추가
.gitignore 설정
eslint 설정 및 eslintrc.json 파엘 rules 및 settiongs 수정
pages 폴더와 간단한 루트 페이지
npm run dev
실행하면 자동으로tsconfig.json
파일이 생성된다. 엄격한 타입을 위하여strict: true
로 수정스타일링 설정하기 (styled-components 구성)
svg를 import 하여 사용하기 위한 설정
ㄴtypes/image.d.ts
ㄴ .babelrc
글로벌 스타일 설정하기
https://github.com/dlgustn555/next-bnb/commit/861580b645c9b771369be2fe226d9bb855623d6a