### A base TSConfig for working with Vite React.

Add the package to your `"devDependencies"`:

```sh
npm install --save-dev @tsconfig/vite-react
yarn add --dev @tsconfig/vite-react
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/vite-react/tsconfig.json"
```

---

The `tsconfig.json`: 

```jsonc
{
  "$schema": "https://www.schemastore.org/tsconfig",
  "_version": "8.0.6",

  "compilerOptions": {
    "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
    "target": "es2023",
    "lib": ["ES2023", "DOM"],
    "module": "esnext",
    "types": ["vite/client"],
    "skipLibCheck": true,

    /* Bundler mode */
    "moduleResolution": "bundler",
    "allowImportingTsExtensions": true,
    "verbatimModuleSyntax": true,
    "moduleDetection": "force",
    "noEmit": true,
    "jsx": "react-jsx",

    /* Linting */
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "erasableSyntaxOnly": true,
    "noFallthroughCasesInSwitch": true
  }
}

```

You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/vite-react.json).
