kumuのつぶやき

フロントエンド勉強中の学生のただつぶやき

vite ✖️ React ✖️ TS メモ

普段npmしか使ってないのでnpmのみ
npm init vite@latest

➜ npm init vite@latest
Need to install the following packages:
  create-vite@latest
Ok to proceed? (y) y
✔ Project name: … 
✔ Package name: … 
✔ Select a framework: › react
✔ Select a variant: › react-ts
package.json
{...
  "scripts": {
    "dev": "vite",
    "build": "tsc && vite build",
    "preview": "vite preview"
  },
...}

vscodeでTSのバージョンをワークスペースに合わせないとエディター側でエラーが出ることがある。