From 9031f6cd976ef93c08ce6aa85a2d2860cbc3ab34 Mon Sep 17 00:00:00 2001 From: Mordechai Dror Date: Mon, 9 Dec 2024 11:01:21 +0200 Subject: [PATCH] add explanation on why diverge from default vite solution for tsconfig files --- tsconfig.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index e504107..2c221f9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,11 +30,11 @@ "moduleResolution": "Bundler", "module": "ESNext", "noEmit": true, + "allowImportingTsExtensions": true, /* Runtime/Framework */ "lib": ["ESNext", "DOM", "DOM.Iterable"], "jsx": "react-jsx", - "allowImportingTsExtensions": true, /* Misc */ "types": [ @@ -43,6 +43,13 @@ "@total-typescript/ts-reset" ] }, + // using unified tsconfig.json instead of separate tsconfig.json / + // tsconfig.app.json / tsconfig.node.json because of two reasons: + // 1. separate configs with references to each other don't work well + // with "noEmit": true, see https://github.com/vitejs/vite/issues/18139 + // 2. although e2e is ran in node env, it has pieces like page.evaluate + // callback, that is run in browser, so dedicated node config still + // needs to include browser env as well "include": [ "src", "e2e",