FlowF
Denoβ€’12mo ago
Flow

`.svelte` file intellisense can't properly resolve imports in a Deno only project

I have a Deno workspace with:
- a shared member which in the
deno.json
has "name": "@scope/shared"
- a
client
member which is Vite+Svelte and only uses Deno (no
package.json
)

everything works and builds perfectly fine however:
- if i try to import { Foo } from "@scope/shared in a .svelte file intellisense errors and cannot find it.
- it works fine in
.ts
and
.tsx
files.
- also maybe of note is that if i instead change the import to be a path, like "../../shared/mod.ts" it does find it, but it doesn't properly figure out types
- for example, shared uses
zod
and exports a function that takes in a (msg: z.infer<R>) => void, that z.infer<R> isnt expanded into the actual type like it does outside of a .svelte file
Was this page helpful?