tsconfig is not generated correctly
Please see the video below. <v- tags are no recognized, autocompletete does not work by default. However, if I use the full class name then autocomplete works for any component, and after that it also works for <v- tags.
It is very easy to reproduce, just create a new vuetify typescript project yarn create vuetify then open it in vscode (with vue official plugin installed).
Version: 1.90.0 Commit: 6319a0b6210a13408ab1ef44be93444143942ea8 Date: 2024-05-03T07:47:29.201Z Electron: 28.3.1 ElectronBuildId: undefined Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Linux x64 6.6.30-2-MANJARO Vue plugin version 2.0.17
npm version
{
npm: '10.7.0',
node: '20.13.0',
acorn: '8.11.3',
ada: '2.7.8',
ares: '1.28.1',
base64: '0.5.2',
brotli: '1.1.0',
cjs_module_lexer: '1.2.2',
cldr: '44.1',
icu: '74.2',
llhttp: '8.1.2',
modules: '115',
napi: '9',
nghttp2: '1.61.0',
openssl: '3.3.0',
simdutf: '5.2.4',
tz: '2023c',
undici: '6.13.0',
unicode: '15.1',
uv: '1.48.0',
uvwasi: '0.0.20',
v8: '11.3.244.8-node.20',
zlib: '1.3.1'
}
https://github.com/vuetifyjs/create/assets/15814836/8a673d54-30db-4dd1-be83-dc0b6fda501b
If I add this to tsconfig:
"include": [
"**/*.ts",
"**/*.js",
"**/*.d.ts",
"**/*.tsx",
"**/*.vue",
"tests/setup.ts"
]
then it works.
(This was originally posted here: https://github.com/vuejs/language-tools/issues/4421 )
Stumbled across this while investigating errors in resolving the plugins module when scaffolding a new project with vue-create@2.2.3
The updates to the include section which @nagylzs mentioned also fixed my resolution errors.
Last time I created a project with create-vuetify was with version 1.1.1. Back then these values where still present in the include setion. What happened?
Environment:
- Windows 11
- Node 20.10.0
- [email protected]
UPDATE: Just realized that adding
"./src/**/*.ts",
"./src/**/*.d.ts",
"./src/**/*.vue"
to the include list results in the following error inside the tsconfig.json
Cannot find type definition file for 'unplugin-vue-router/client'.
The file is in the program because:
Entry point of type library 'unplugin-vue-router/client' specified in compilerOptionsts
Cannot find type definition file for 'vite-plugin-vue-layouts/client'.
The file is in the program because:
Entry point of type library 'vite-plugin-vue-layouts/client' specified in compilerOptions
Facing the same issue as @skaempfer.
I've solved it by using the tsconfig used in v2.1.1.
So far i don't have any issue.
Just noticed that this seems to have been corrected with the 2.2.4 version of the .tsconfig.json
Also I noticed that the previous version not also lead to the described error, but also rendered vue-tsc type-checking incorrect because of the missing include paths.
As of 2.4.0, all d.ts files inside src folder (router/autoimports) are resolved correctly. I'll close this but feel free to reopen with a reproduction