DenoDDeno
Powered by
MelodyMakerM
Denoβ€’2y agoβ€’
15 replies
MelodyMaker

How to resolve an import statement in Deno

Hi, I am testing out Deno, but cannot get it to resolve imports.

For example, how would I get Deno to resolve this import statement...
import { readFileTxt } from '@root/db_fs/src/utilReadFiles';

Notice two things...
1) the "@root" should resolve to "./packages" (i.e. "project-root/packages")
2) if no file extension is specified, a ".js" extension is inferred

Thank you.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Deno: How to import npm scoped packages with @ in deno?
Alex AdventAAlex Advent / help
3y ago
import yaml directly in Deno
CyanCCyan / help
15mo ago
Deno + Vite + DenoKV
AndiAAndi / help
2y ago