티스토리 뷰
필요한 파일
- vite.config.ts
- tsconfig.json
vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
resolve: {
alias: [
{ find: "@", replacement: "/src" },
{ find: "@page", replacement: "/src/page" },
],
},
});
{ find: "@", replacement: "/src" },
생성되는 파일은 src 아래에 존재할 것 이므로 "@" 는 " /src " 로 지정
{ find: "@page", replacement: "/src/page" },
src 아래에 생기는 📁폴더 경로지정
tsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"@page/*": ["src/page/*"]
},
//이외 설정
"include": ["src", "**/*.ts", "**/*.tsx"],
"references": [{ "path": "./tsconfig.node.json" }]
}
"baseUrl": ".",
src/page가 .src/page로 될 수 있도록 설정
이외에는 vite 없이 사용하는 방법과 비슷하기에 설명은 생락하겠어.;
'내가 쓸 유용한 잡지식' 카테고리의 다른 글
tailwind css 나홀로 메모 (0) | 2024.06.21 |
---|---|
yarn typescript 초기 세팅 (vite❌) (0) | 2024.03.17 |
Public에 있는 img 절대경로로 불러오기 (0) | 2024.03.01 |
YouTube Api Key 만들기 (0) | 2024.02.25 |
git branch 이름 수정 (삭제) (0) | 2024.02.23 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 에러모음집
- readme 역할
- nextjs 토큰 만료처리하기
- Warning: A component is changing an uncontrolled input to be controlled.
- Fetch와 Axios 의 장단점
- 유효성검사
- Warning: Each child in a list should have a unique "key" prop.
- styled component 설치방법
- readme 작성해야 하는 이유
- axios instance 작성하기
- styled component 조건부 사용방법
- styled component 사용방법
- 유효성검사 css
- axios 설치하기
- simple Icon 사용방법
- 영화 별점
- readme작성해보기
- axios 사용하기
- styled component GlobalStyle 사용방법
- Warning: validateDOMNesting(...): <li> cannot appear as a descendant of <li>
- 별점 색채우기
- axios CRUD
- git cache
- 영화별점만들기
- readme 작성 방법
- axiosinstance 사용 시 토큰 사용 법
- 별점만들기
- readme 이미지 추가 방법
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
글 보관함