error: TypeScript files are not supported in npm packages:
I am wondering why I cannot import a .ts file from a node_modulesnode_modules directory.
If I could do this then I could use npm as a package manager which would allow me to take advantage of the things that I love about deno as well as being able to work with modules in a familiar way (eg. bundle templates, stylesheets, static assets, whatnot alongside the scripts).
eg.
import { foo } from "./node_modules/abc/main.ts";foo();
import { foo } from "./node_modules/abc/main.ts";foo();
or
import { foo } from "@abc/main.ts";foo();
import { foo } from "@abc/main.ts";foo();
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
D
Deno
Chat about Deno, a modern runtime for JavaScript and TypeScript.