D
Deno
Search
A
Deno
•
14mo ago
AnxiousAverage
Is there a way to use the import alias @/ using deno and vite?
Deno
Join
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,990
Members
View on Discord
Was this page helpful?
Yes
No
J
John Adams
•
10/31/24, 9:27 PM
You have to specify these shorthand alias names to point to actual url or packages in the
file
. If these are npm packages you can run in the terminal
/command line
and it will make the name alias for you
. This blog has an example that might help
.
https://jrson.me/blog/path-aliases-with-import-maps-on-deno/
but you can also look at Deno
's official documentation for it here
:
https://docs.deno.com/runtime/fundamentals/configuration/#dependencies
jrson.me
Path aliases with import maps on Deno - jrson.me
A tiny guide how to resolve paths using path aliases with import maps on Deno
.
deno.json
deno.json
deno install npm:<package_name>
deno install npm:<package_name>