AnxiousAverage
AnxiousAverage2mo ago

Is there a way to use the import alias @/ using deno and vite?

No description
1 Reply
John Adams
John Adams2mo ago
You have to specify these shorthand alias names to point to actual url or packages in the deno.json file. If these are npm packages you can run in the terminal/command line deno install npm:<package_name> 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.

Did you find this page helpful?