Cannot get TS to accept $lib import alias
Super frustrating. I'm using sveltekit which has a default $lib import alias. I've added the alias to my deno.json, and the import itself works, but the TS error won't go away.
Any ideas?
5 Replies
Looks like the Deno extension isn't enabled for this particular project. Run the
Deno: Enable
command in the vscode command paletteI believe it is.
I ran the command anyway and reloaded vscode and it didn't change anything
Additionally, the
$lib
import works in files inside the lib
directoryI don't know what magic Deno does behind the scenes, but whatever the case it seems like the import mapping from
deno.json
doesn't make it to the ts
server
Adding my own tsconfig
in the base directory with the "paths"
configured the exact same as in my deno.json
has fixed the issue.
Will this cause other issues I'm not aware of?