DimmieManD
Denoβ€’11mo ago
DimmieMan

Getting svelte-language-server/typescript-language-server to recognise deno workspace packages?

Attempting to get svelte kit going in a monorepo and what i hope is my last roadblock is having the svelte/typescript language sever recognise my local workspace packages.

deno.json 
packages
  app
    ...svelte stuff
    package.json
  foo (@scope/foo)
    main.ts
    deno.json


With @deno/vite-plugin things work at runtime no problem and ts files have no issues as they're running deno LSP.

Svelte files and their language server however isn't picking them up.

<script lang="ts">
    import type { PageProps } from "./$types.d.ts";
    import { add } from "@repo/foo";
    const { data }: PageProps = $props();
</script>

will fail with ts: Cannot find module '@scope/foo' or its corresponding type declarations.


Is there a trick i'm missing to get standard typescript tooling to recognise the package?
Was this page helpful?