DenoDDeno
Powered by
foxpro 🐍F
Denoβ€’3y ago
foxpro 🐍

How to use declarations from `vite/client`?

There are declarations: https://esm.sh/v126/vite@4.3.9/client.d.ts
According to documentation, I need to specify
types
types
in
compilerOptions
compilerOptions
:
  "compilerOptions": {
    "allowJs": false,
    "lib": [
      "dom",
      "dom.iterable",
      "dom.extras",
      "deno.ns"
    ],
    "jsx": "preserve",
    "jsxImportSource": "solid-js",
    "strict": false,
    "types": [
      "vite/client"
    ]
  },
  "compilerOptions": {
    "allowJs": false,
    "lib": [
      "dom",
      "dom.iterable",
      "dom.extras",
      "deno.ns"
    ],
    "jsx": "preserve",
    "jsxImportSource": "solid-js",
    "strict": false,
    "types": [
      "vite/client"
    ]
  },

and in
import_map.json
import_map.json
I have:
        "vite": "npm:vite",
        "vite/client": "npm:vite/client",
        "vite": "npm:vite",
        "vite/client": "npm:vite/client",

seems like Deno resolves
vite/client
vite/client
fine, but doesn't merge declarations (pic,
Property 'env' does not exist on type 'ImportMeta'. deno-ts(2339)
Property 'env' does not exist on type 'ImportMeta'. deno-ts(2339)
).
image.png
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to use Deno modules in Vite app (Vue specifically)
maarteNNNMmaarteNNN / help
3y ago
Unable to use @apollo/client
moochMmooch / help
16mo ago
How to use `f-partial` from Fresh?
martpetMmartpet / help
3y ago