A Vite plugin (v1.0.4, latest) that lets you use custom tsconfig filenames like tsconfig.build.json or tsconfig.app.json with Vite. It works by copying your chosen tsconfig.*.json to tsconfig.json before Vite starts and removing it after the build finishes. This is a simple solution for monorepos or projects needing different TypeScript configurations for different environments. The plugin is lightweight, has no dependencies, and supports both ESM and CJS imports. Unlike alternatives like tsconfig-paths-webpack-plugin for Webpack, this plugin is Vite-specific and focuses solely on swapping tsconfig.json files.
npm install vite-plugin-custom-tsconfigVerified import paths — ran on the pinned version, not inferred.
Shows how to use the plugin to set a custom tsconfig filename (tsconfig.app.json) in your Vite configuration.
Run Vite builds sequentially or ensure other tools are not watching for tsconfig.json changes.
Ensure your custom tsconfig extends relative paths correctly.
Copy the custom tsconfig manually or use a symlink during development.
Run `npm install --save-dev vite-plugin-custom-tsconfig`
Use `import customTsConfig from 'vite-plugin-custom-tsconfig'` or `import { customTsConfig } from 'vite-plugin-custom-tsconfig'` consistently.Create the file or adjust the `filename` option in the plugin config.
No dependency data recorded yet.