경고문
-
[Vite] 절대경로 설정프로그래밍/React 2024. 1. 3. 14:14
Vite + Typescript 를 사용한 프로젝트에서 절대경로를 설정하는 방법 tsconfg.json 과 vite.config.json 모두 고쳐줘야한다. >tsconfig.json { "compilerOptions": { "baseUrl": "src", ... "path": { "pages/*": ["pages/*"], "components/*": ["components/*"], } } 아래의 설정을 하지 않아서 경로를 제대로 찾지 못하는 에러가 발생했었음. import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; // https://vitejs.dev/config/ export default defineCon..