UNPKG

@tsconfig/vite-react

Version:

A base TSConfig for working with Vite React.

54 lines (41 loc) 1.18 kB
### 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://json.schemastore.org/tsconfig", "_version": "7.0.0", "compilerOptions": { "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", "target": "ES2022", "useDefineForClassFields": true, "lib": ["ES2022", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, /* Bundler mode */ "moduleResolution": "bundler", "allowImportingTsExtensions": true, "verbatimModuleSyntax": true, "moduleDetection": "force", "noEmit": true, "jsx": "react-jsx", /* Linting */ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "erasableSyntaxOnly": true, "noFallthroughCasesInSwitch": true, "noUncheckedSideEffectImports": true } } ``` You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/vite-react.json).