뚝딱뚝딱 코딩 기록_

  • 홈
  • 태그
  • 방명록

REST API 1

[리액트] Vite_proxy 설정하기_🐾 / 리액트 + Vite + TypeScript, axios, CORS 에러

[React+Vite_proxy] React + Vite 에서 proxy 설정하는 방법에 대해 알아보자 🐾 proxy 설정 // vite.config.ts import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], server: { // 추가하기 proxy: { '/api': { target: 'url', changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, '') }, } } }) - vite.config.ts 파일에 server 부분을 추가해 주면 된다 🐾 axios axios...

STUDY/React & React Native 2022.08.29
이전
1
다음
더보기
프로필사진

👇 ez1n's Github 👇 https://github.com/ez1n

  • CATEGORY (113)
    • PROJECT (6)
    • STUDY (89)
      • Javascript & Typescript (6)
      • React & React Native (28)
      • Next js (4)
      • Flutter (1)
      • Algorithm (41)
      • CS (9)
    • RECORD (18)

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

Archives

Calendar

«   2025/08   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

  • Github

티스토리툴바