How correctly configure vscode for vue project using deno?
Important spoiler - problems are related only to highlighting in vscode, because builds, dev, scripts... all these stuff is worked!
Deno + Vue is very attractive option! You can write api and ui aka in monorepository and share for example models, types or validators among them... etc.
My problem exploring notes:
as I already mentioned early - only highlighting in vscode is the target of this article
I think that *.vue files in vscode are supported with volar extension, so it expect typescript lsp, not deno's one - and this is main problem
so if we use deno's lsp it don't understand SingleFileComponent syntax
I try to make independent configurations both for typescript and deno, sync their aliases, imports, node_modules etc. It works! But it is not pretty enough and I hope more powerful and standard solutions are exists.
my standard part of solution:
vite.config.mtswith allnpm:*importsdeno.jsonwith aliases inimportsto be more closely to original npm namesand additionaly strange part:
.vscode/settings.jsonenable deno only for apitsconfig.jsontypes if this project was standard vue-vite-node-vscode...dev-hackfolder withpackage.jsonand import all modules withnpmtsconfig.json(compilerOptions.typeRoots[) path todev-hack/node_modulesSo except api (if such exists) all files are served in vscode by typescript using tsconfig.json that use dev-hack/node_modules (of course node_modules in .gitignore)... And this is only for highlighting!
The real build/serve/dev... are worked as expected without typescript configured as explained above but only with deno+vite as written in docs.