A very simple plugin to support using filenames like tsconfig.build.json or tsconfig.app.json with Vite. It copies your tsconfig.*.json to tsconfig.json before Vite starts, and removes it when the build is finished.
Using Yarn
yarn add -D vite-plugin-custom-tsconfig
Using pnpm
pnpm add -D vite-plugin-custom-tsconfig
Using npm
npm install --save-dev vite-plugin-custom-tsconfig
// vite.config.ts
import customTsConfig from 'vite-plugin-custom-tsconfig';
import {defineConfig} from 'vite';
export default defineConfig({
plugins: [
customTsConfig({
// default: 'tsconfig.build.json'
tsConfigPath: 'tsconfig.app.json',
}),
],
});