일단 여기에 이어서 함. 1. axios 모듈을 받아야 함. npm install axios 2. client.ts 파일 생성 touch src/scripts/client.ts 3. client.ts 파일 작성 import axios, { InternalAxiosRequestConfig } from 'axios'; const client = axios.create({ headers: { 'X-Requested-With': 'XMLHttpRequest', 'Cache-Control': 'no-store', }, withCredentials: true, }); export const getData = async ( url: string, params?: any, config?: InternalAxiosReq..
설치 당시 버전 Vite : 5.0 / Vue : 3.3 / ESLint : 8.56 / Prettier : 3.1 / Pinia : 2.1 / Vue-Router : 4.2 프로젝트 생성 npm create vite@latest [프로젝트 이름] √ Package name: ... [프로젝트 이름] √ Select a framework: » Vue √ Select a variant: » TypeScript src내 필요한 폴더 추가 mkdir src/views mkdir src/stores mkdir src/router mkdir src/styles Prettier 및 ESLint 설치 npm i -D eslint prettier typescript .vscode/setting.json 작성 { "ed..
vite로 번들러를 변경하고 진행하다 만난 오류다. Buffer라는 BufferConstructor를 사용해야 하는데 안 되길래 뭔가 하고 봤더니 type이 any다. 이건 설치하고 수정해야한다는 계시인 것이다. 1. @esbuild-plugins/node-globals-polyfill 설치 npm install @esbuild-plugins/node-globals-polyfill 2. vite.config.js 수정 import ... 생략 ... import GlobalPolyFill from "@esbuild-plugins/node-globals-polyfill"; export default defineConfig({ ... 생략 ... plugins: [ ... 생략 ... GlobalPolyFi..