### Install @vue/tsconfig Source: https://github.com/vuejs/tsconfig/blob/main/README.md Command to install the @vue/tsconfig package as a development dependency. ```sh npm add -D @vue/tsconfig ``` -------------------------------- ### Node.js Environment TSConfig Configuration (without Vue/Vite) Source: https://github.com/vuejs/tsconfig/blob/main/README.md Configuration for Node.js environments without Vue/Vite specific features. Installs Node.js types and extends the base Node.js tsconfig. ```json { "extends": "@tsconfig/node24/tsconfig.json", "compilerOptions": { "types": ["node"] } } ``` -------------------------------- ### Override lib option for older browser support Source: https://github.com/vuejs/tsconfig/blob/main/README.md Overrides the default 'lib' option in tsconfig.dom.json to target older browsers, ensuring TypeScript throws errors on newer features. ```json { "extends": "@vue/tsconfig/tsconfig.dom.json", "compilerOptions": { "lib": ["ES2016", "DOM", "DOM.Iterable"] } } ``` -------------------------------- ### Emitting Declaration Files for Libraries Source: https://github.com/vuejs/tsconfig/blob/main/README.md Enables emitting declaration files for libraries or component libraries by extending both the browser environment TSConfig and the library TSConfig. ```json { "extends": [ "@vue/tsconfig/tsconfig.dom.json", "@vue/tsconfig/tsconfig.lib.json" ] } ``` -------------------------------- ### Node.js Environment TSConfig Configuration (with Vue/Vite) Source: https://github.com/vuejs/tsconfig/blob/main/README.md Configuration for Node.js environments using Vue components (SSR, Vitest). Extends both Node.js and Vue TSConfigs, ensuring Vue TSConfig takes precedence. ```json { "extends": [ "@tsconfig/node24/tsconfig.json", "@vue/tsconfig/tsconfig.json" ], "compilerOptions": { "types": ["node"] } } ``` -------------------------------- ### Base TSConfig Configuration Source: https://github.com/vuejs/tsconfig/blob/main/README.md Extends the base TypeScript configuration provided by @vue/tsconfig, suitable for runtime-agnostic Vue projects. ```json { "extends": "@vue/tsconfig/tsconfig.json" } ``` -------------------------------- ### Browser Environment TSConfig Configuration Source: https://github.com/vuejs/tsconfig/blob/main/README.md Extends the TypeScript configuration for browser environments, using @vue/tsconfig/tsconfig.dom.json. ```json { "extends": "@vue/tsconfig/tsconfig.dom.json" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.