DEV Community

Discussion on: From Node to Deno

Collapse
 
imichael profile image
✨iMichael✨ • Edited

Thanks for writing this up. Do you know if there a way to define a common host name for imports? From an aesthetic POV, this looks jarring to my eyes.

import { Client } from "https://deno.land/x/mysql/mod.ts";

It would be nice to do this instead

import { Client } from "mysql/mod";

and let some manifest or configuration flag handle the rest.

Collapse
 
aralroca profile image
Aral Roca

Yes! Deno supports import_map.json

References:
deno.land/manual/linking_to_extern...
wicg.github.io/import-maps/

Collapse
 
dels07 profile image
Deli Soetiawan

And there's might be a tool to manage this similar to npm in future