Skip to content

Commit

Permalink
add explanation on why diverge from default vite solution for tsconfi…
Browse files Browse the repository at this point in the history
…g files
  • Loading branch information
vorant94 committed Dec 9, 2024
1 parent 1bc0a2b commit 9031f6c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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",
Expand Down

0 comments on commit 9031f6c

Please sign in to comment.