@tsconfig/vite-react

A base TSConfig for working with Vite React.

Usage no npm install needed!

<script type="module">
  import tsconfigViteReact from 'https://cdn.skypack.dev/@tsconfig/vite-react';
</script>

README

A base TSConfig for working with Vite React.

Add the package to your "devDependencies":

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

Add to your tsconfig.json:

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

The tsconfig.json:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "display": "Vite React",
  "compilerOptions": {
    "target": "ESNext",
    "lib": ["DOM", "DOM.Iterable", "ESNext"],
    "allowJs": false,
    "skipLibCheck": false,
    "esModuleInterop": false,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "ESNext",
    "moduleResolution": "Node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react"
  }
}

You can find the code here.