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
file1 replies
Beginner question about Deno on the web
Hi, I've been looking into Deno recently and I love everything I'm reading so far but something I'm confused about is: what does it actually mean to use Deno for a website frontend? Isn't Deno a runtime? What can it do on the browser?
I tried experimenting with SvelteKit and Deno by doing
deno run -A npm:sv create
, deno install
, deno task dev
, but as I expected, all I'm still writing is normal browser code. Where does Deno come in?
Keep in mind that I'm not super well versed in a lot of web technologies so this might just be a misunderstanding on my part.5 replies