vuejs / create-vue

🛠️ The recommended way to start a Vite-powered Vue project
Other
3.71k stars 423 forks source link

Documentation for tsconfig setup #533

Closed bmulholland closed 3 months ago

bmulholland commented 3 months ago

Is it possible to document the tsconfig setup somewhere? I'm trying to follow the intent with the tsconfig.app.json and vitest and so forth and I'm just very lost. I put some of my confusion down here but honestly that's just the start. Do I need to configure tsserver or Volar somehow? If I need to add new types or libs, how do I do that? Do I need to set it in the app one and also in vitest? These questions are just the start. It feels like every time I try to fix something in this set of configs, I break something else, and then only find out ages later.

The biggest issue is that all of these thing have really large footguns. tsconfig values get overwritten, and also it seems some of them are loaded by specific tools somehow, so it's easy to e.g. add one lib in one place and then suddenly you've broken type checking, but only for volar and for some editors, not when you run vue-tsc. Or several variations of that.

bmulholland commented 3 months ago

Dupe of https://github.com/vuejs/create-vue/issues/265