From 494dd031713eaaf6fe2d9e5705e35f8a4ed50914 Mon Sep 17 00:00:00 2001 From: Edie Lemoine Date: Fri, 18 Nov 2022 15:55:45 +0100 Subject: [PATCH] fix: don't throw error when our own tsconfig exists --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index b1a3d98..54758de 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,7 +29,7 @@ function customTsConfigPlugin(options?: PluginOptions): Plugin { name: NAME, config() { - if (tsConfigExists() && tsConfigHasBanner()) { + if (tsConfigExists() && !tsConfigHasBanner()) { throw new Error( "tsconfig.json already exists. Please delete it or remove vite-plugin-custom-tsconfig from your Vite config" );