Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 924 Bytes

README.md

File metadata and controls

42 lines (30 loc) · 924 Bytes

vite-plugin-custom-tsconfig

NPM

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.

Installation

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

Usage

// 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',
    }),
  ],
});