TypeScript

[TypeScript] 기본 설정

킹왕짱지지 2024. 3. 19. 15:01

 

npm init
npm install -save-dev lite-server

npm install –g typescript

#package.json "script" 내부
"start": "lite-server"

 

연동할때는 계속 tsc app.ts 쳐줘야 js와 연동됨 

tsc app.ts

 

 

 

 

 

 

+npm init이 안되는 경우

-폴더명 확인해보기. 스페이스바, 한글 XX

 

+아무것도 지정을 안했는데 404 오류가 난다? 

아이콘이 없는 것 

<link rel="shortcut icon" href="#"> 

 

html head에 위 코드를 추가하면 해결